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); }
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); }
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); }