コード例 #1
0
        public void NPocoUnitOfWork_Constructor_Initialises_Database_Field()
        {
            //Arrange

            //Act
            var context = new NPocoUnitOfWork(ConnectionStringName, _cache.Object);

            //Assert
            Assert.IsInstanceOf<Database>(context.Database);
        }
コード例 #2
0
        public void NPocoUnitOfWork_Constructor_Initialises_Database_Field()
        {
            //Arrange

            //Act
            var context = new NPocoUnitOfWork(ConnectionStringName, _cache.Object);

            //Assert
            Assert.IsInstanceOf <Database>(context.Database);
        }
コード例 #3
0
        public void NPocoUnitOfWork_GetRepository_Returns_Repository()
        {
            //Arrange, Act
            var context = new NPocoUnitOfWork(ConnectionStringName, _cache.Object);

            //Act
            var rep = context.GetRepository<Dog>();

            //Assert
            Assert.IsInstanceOf<IRepository<Dog>>(rep);
        }
コード例 #4
0
        public void NPocoUnitOfWork_GetRepository_Returns_Repository()
        {
            //Arrange, Act
            var context = new NPocoUnitOfWork(ConnectionStringName, _cache.Object);

            //Act
            var rep = context.GetRepository <Dog>();

            //Assert
            Assert.IsInstanceOf <IRepository <Dog> >(rep);
        }
コード例 #5
0
 public void SetUp()
 {
     _cache           = new Mock <ICacheProvider>();
     _nPocoUnitOfWork = CreateNPocoUnitOfWork();
 }
コード例 #6
0
 public void SetUp()
 {
     _cache = new Mock<ICacheProvider>();
     _nPocoUnitOfWork = CreateNPocoUnitOfWork();
 }