Пример #1
0
        public void Create_ShouldReturnNewInstanceOfMsSqlDbContextClass()
        {
            // Arrange and Act
            var result = MsSqlDbContext.Create();

            // Assert
            Assert.IsInstanceOf <MsSqlDbContext>(result);
            Assert.AreEqual("MsSqlDbContext", result.GetType().Name);
        }
Пример #2
0
        public void Create_Should_ReturnNewDbContextInstance()
        {
            // Arrange & Act
            var newContext = MsSqlDbContext.Create();

            // Assert
            Assert.IsNotNull(newContext);
            Assert.IsInstanceOf <IMsSqlDbContext>(newContext);
        }
Пример #3
0
        public void ReturnNewDbContext_WhenParamsAreValid()
        {
            // Arrange & Act
            var newContext = MsSqlDbContext.Create();

            // Assert
            Assert.IsNotNull(newContext);
            Assert.IsInstanceOf <MsSqlDbContext>(newContext);
        }
 public SchoolAccessFilter(string Role)
 {
     this.schoolRepository = new EfRepository <School>(MsSqlDbContext.Create());
     this.role             = Role;
 }