Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use IANA example.com domain #1820

Merged
merged 2 commits into from
Oct 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ public void Add_writes_to_database()
using (var context = new BloggingContext(options))
{
var service = new BlogService(context);
service.Add("http://sample.com");
service.Add("https://example.com");
context.SaveChanges();
}

// Use a separate instance of the context to verify correct data was saved to database
using (var context = new BloggingContext(options))
{
Assert.Equal(1, context.Blogs.Count());
Assert.Equal("http://sample.com", context.Blogs.Single().Url);
Assert.Equal("https://example.com", context.Blogs.Single().Url);
}
}

Expand All @@ -40,9 +40,9 @@ public void Find_searches_url()
// Insert seed data into the database using one instance of the context
using (var context = new BloggingContext(options))
{
context.Blogs.Add(new Blog { Url = "http://sample.com/cats" });
context.Blogs.Add(new Blog { Url = "http://sample.com/catfish" });
context.Blogs.Add(new Blog { Url = "http://sample.com/dogs" });
context.Blogs.Add(new Blog { Url = "https://example.com/cats" });
context.Blogs.Add(new Blog { Url = "https://example.com/catfish" });
context.Blogs.Add(new Blog { Url = "https://example.com/dogs" });
context.SaveChanges();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ public void Add_writes_to_database()
using (var context = new BloggingContext(options))
{
var service = new BlogService(context);
service.Add("http://sample.com");
service.Add("https://example.com");
context.SaveChanges();
}

// Use a separate instance of the context to verify correct data was saved to database
using (var context = new BloggingContext(options))
{
Assert.Equal(1, context.Blogs.Count());
Assert.Equal("http://sample.com", context.Blogs.Single().Url);
Assert.Equal("https://example.com", context.Blogs.Single().Url);
}
}
finally
Expand Down Expand Up @@ -70,9 +70,9 @@ public void Find_searches_url()
// Insert seed data into the database using one instance of the context
using (var context = new BloggingContext(options))
{
context.Blogs.Add(new Blog { Url = "http://sample.com/cats" });
context.Blogs.Add(new Blog { Url = "http://sample.com/catfish" });
context.Blogs.Add(new Blog { Url = "http://sample.com/dogs" });
context.Blogs.Add(new Blog { Url = "https://example.com/cats" });
context.Blogs.Add(new Blog { Url = "https://example.com/catfish" });
context.Blogs.Add(new Blog { Url = "https://example.com/dogs" });
context.SaveChanges();
}

Expand Down