public void Comparer_SameRange() { string testName = Guid.NewGuid().ToString(); //TestContext.TestName; string rangeParamName = "Column1"; string fromValue = "Rem11"; string toValue = "Rem11"; var compareClause = MemoryStorage.GetComparer(rangeParamName, fromValue, toValue); var data = new Dictionary <string, object>(); data[rangeParamName] = "Rem09"; Assert.False(compareClause(data), $"From={fromValue} To={toValue} Compare Value={data[rangeParamName]}"); data[rangeParamName] = "Rem10"; Assert.False(compareClause(data), $"From={fromValue} To={toValue} Compare Value={data[rangeParamName]}"); data[rangeParamName] = "Rem11"; Assert.True(compareClause(data), $"From={fromValue} To={toValue} Compare Value={data[rangeParamName]}"); data[rangeParamName] = "Rem12"; Assert.False(compareClause(data), $"From={fromValue} To={toValue} Compare Value={data[rangeParamName]}"); data[rangeParamName] = testName; Assert.False(compareClause(data), $"From={fromValue} To={toValue} Compare Value={data[rangeParamName]}"); }
public void Comparer_OutsideRange() { string testName = TestContext.TestName; string rangeParamName = "Column1"; string toValue = "Rem10"; string fromValue = "Rem12"; var compareClause = MemoryStorage.GetComparer(rangeParamName, fromValue, toValue); var data = new Dictionary <string, object>(); data[rangeParamName] = "Rem09"; Assert.IsTrue(compareClause(data), "From={0} To={1} Compare Value={2}", fromValue, toValue, data[rangeParamName]); data[rangeParamName] = "Rem10"; Assert.IsTrue(compareClause(data), "From={0} To={1} Compare Value={2}", fromValue, toValue, data[rangeParamName]); data[rangeParamName] = "Rem11"; Assert.IsFalse(compareClause(data), "From={0} To={1} Compare Value={2}", fromValue, toValue, data[rangeParamName]); data[rangeParamName] = "Rem12"; Assert.IsTrue(compareClause(data), "From={0} To={1} Compare Value={2}", fromValue, toValue, data[rangeParamName]); data[rangeParamName] = testName; Assert.IsTrue(compareClause(data), "From={0} To={1} Compare Value={2}", fromValue, toValue, data[rangeParamName]); }