public void Test_CompareTo_WhenNotInValues_ShouldReturnNotZero() { //-------------Setup Test Pack ------------------ object[] values = new object[] { "100", "200", "300" }; Criteria.CriteriaValues criteriaValues = new Criteria.CriteriaValues(values); //-------------Execute test --------------------- int result = criteriaValues.CompareTo("10"); //-------------Test Result ---------------------- Assert.AreNotEqual(0, result); }
public void Test_ConstructorRemovesQuotesAroundStrings() { //-------------Setup Test Pack ------------------ object[] values = new object[] { "'100'", "'200'", "'300'" }; Criteria.CriteriaValues criteriaValues = new Criteria.CriteriaValues(values); //-------------Execute test --------------------- int result = criteriaValues.CompareTo("100"); //-------------Test Result ---------------------- Assert.AreEqual(0, result); }
public void Test_CompareTo_WhenInValues_ShouldReturnZero() { //-------------Setup Test Pack ------------------ object[] values = new object[] { "100", "200", "300" }; Criteria.CriteriaValues criteriaValues = new Criteria.CriteriaValues(values); //-------------Execute test --------------------- int result = criteriaValues.CompareTo("100"); //-------------Test Result ---------------------- Assert.AreEqual(0, result); }
public void Test_CompareTo_WhenNullInValuesAndLookingForValue_ShouldReturnZero() { //-------------Setup Test Pack ------------------ object[] values = new object[] { "100", null, "300" }; Criteria.CriteriaValues criteriaValues = new Criteria.CriteriaValues(values); //-------------Execute test --------------------- int result = criteriaValues.CompareTo("300"); //-------------Test Result ---------------------- Assert.AreEqual(0, result); }