public void Equals_GivenDifferentConditionData_ShouldReturnTrue(string sourceTable, string sourceColumn, EqualityOperators equalityOperator, string compareTable, string compareColumn) { //---------------Set up test pack------------------- var conditionModel = new ColumnConditionModel(sourceTable, sourceColumn, equalityOperator, compareTable, compareColumn) { DatabaseProvider = new SqlServerDatabaseProvider() }; var compareCondition = new ColumnConditionModel("unknownTable", "illegalColumn", EqualityOperators.StartsWith, "UnknownCompareTable", "UnknownCompareColumn") { DatabaseProvider = new SqlServerDatabaseProvider() }; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var equalResult = conditionModel.Equals(compareCondition); //---------------Test Result ----------------------- Assert.IsFalse(equalResult); }
public void Equals_GivenSameConditionData_ShouldReturnTrue(string sourceTable, string sourceColumn, EqualityOperators equalityOperator, string compareTable, string compareColumn) { //---------------Set up test pack------------------- var conditionModel = new ColumnConditionModel(sourceTable, sourceColumn, equalityOperator, compareTable, compareColumn) { DatabaseProvider = new SqlServerDatabaseProvider() }; var compareCondition = new ColumnConditionModel(sourceTable, sourceColumn, equalityOperator, compareTable, compareColumn) { DatabaseProvider = new SqlServerDatabaseProvider() }; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var equalResult = conditionModel.Equals(compareCondition); //---------------Test Result ----------------------- Assert.IsTrue(equalResult); }