mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-21 06:03:57 +00:00
Initial commit
This commit is contained in:
parent
445d54a047
commit
1da926d605
10 changed files with 159 additions and 6 deletions
|
|
@ -0,0 +1,28 @@
|
|||
using Packt.Shared; // NorthwindContext
|
||||
|
||||
namespace Northwind.Common.UnitTests
|
||||
{
|
||||
public class EntityModelTests
|
||||
{
|
||||
[Fact]
|
||||
public void DatabaseConnectTest()
|
||||
{
|
||||
using (NorthwindContext db = new())
|
||||
{
|
||||
Assert.True(db.Database.CanConnect());
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CategoryCountTest()
|
||||
{
|
||||
using (NorthwindContext db = new())
|
||||
{
|
||||
int expected = 8;
|
||||
int actual = db.Categories.Count();
|
||||
|
||||
Assert.Equal(expected, actual);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue