예제 #1
0
        public void Start_TimeoutAndWatchDogTimeOutAreTakenFromSettings()
        {
            //Arrange
            var sqlDependencyProvider = CreateClassUnderTest();
            var settings = new SqlTableDependencySettings <TestModel> {
                TimeOut = 121, WatchDogTimeOut = 200
            };

            sqlDependencyProvider.SetSettings(settings);

            //Act
            sqlDependencyProvider.SubscribeToEntityChanges();

            //Assert
            tableDependencyMoq.Verify(c => c.Start(settings.TimeOut, settings.WatchDogTimeOut), Times.Once);
        }
예제 #2
0
        public void SchemaName_DefaultIsDbo()
        {
            //Arrange
            var sqlDependencyProvider = CreateClassUnderTest();
            var settings = new SqlTableDependencySettings <TestModel> {
                SchemaName = "dbo"
            };

            sqlDependencyProvider.SetSettings(settings);

            //Act
            var tableName = sqlDependencyProvider.SchemaName;

            //Assert
            tableName.Should().Be(settings.SchemaName);
        }
예제 #3
0
        public void TableName_SettingTableNameWasSet()
        {
            //Arrange
            var sqlDependencyProvider = CreateClassUnderTest();

            var settings = new SqlTableDependencySettings <TestModel> {
                TableName = "TableName"
            };

            sqlDependencyProvider.SetSettings(settings);

            //Act
            var tableName = sqlDependencyProvider.TableName;

            //Assert
            tableName.Should().Be(settings.TableName);
        }