示例#1
0
        public void ItShouldFindMatch()
        {
            var index = _random.Next(0, _collection.Count);

            var expected = _collection[KeyFormat(_pattern, index)];

            Assert.AreEqual(expected, DataTableRequestCollection.GetValue(_collection, _pattern, index, _defaultValue), string.Format("you are looking for {0} at {1} which is {2}", _pattern, index, expected));
        }
示例#2
0
        public void ItShouldNotFindMatch()
        {
            var index = _random.Next(0, _collection.Count);

            Assert.AreEqual(_defaultValue, DataTableRequestCollection.GetValue(_collection, _pattern, index, _defaultValue));
        }
示例#3
0
 public void AndPatternItShouldBeMatch()
 {
     Assert.AreEqual(_expected, DataTableRequestCollection.GetValue(Collection, Guid.NewGuid().ToString(), -1, _expected));
 }
示例#4
0
 public void AndNoPatternItShouldBeMatch()
 {
     Assert.AreEqual(_expected, DataTableRequestCollection.GetValue(Collection, null, -1, _expected));
 }