예제 #1
0
        public void Return_InstanceOfIComicShopDbContext()
        {
            // Arrange & Act
            var context = new ComicShop.Data.ComicShopDbContext();

            // Assert
            Assert.IsInstanceOf <IComicShopDbContext>(context);
        }
예제 #2
0
        public void HaveParameterlessConstructor()
        {
            // Arrange & Act
            var context = new ComicShop.Data.ComicShopDbContext();

            // Assert
            Assert.IsInstanceOf <ComicShop.Data.ComicShopDbContext>(context);
        }
예제 #3
0
        public void SetComicsDbSetAndOrdersDbSet()
        {
            // Arrange
            var context = new ComicShop.Data.ComicShopDbContext();
            var comics  = new DbSetForTest <Comic>();
            var orders  = new DbSetForTest <Order>();

            //Act
            context.Comics = comics;
            context.Orders = orders;

            //Assert
            Assert.AreEqual(context.Comics, comics);
            Assert.AreEqual(context.Orders, orders);
        }