Beispiel #1
0
 FuzzyListTest()
 {
     minCount  = 1 + random.Next() % 10;
     maxCount  = minCount + 1 + random.Next() % 10;
     itemCount = Count.Between(minCount, maxCount);
     sut       = new FuzzyList <TestItem>(fuzzy, itemFactory, itemCount);
 }
Beispiel #2
0
 FuzzyDictionaryTest()
 {
     minCount = 1 + random.Next() % 10;
     maxCount = minCount + 1 + random.Next() % 10;
     count    = Count.Between(minCount, maxCount);
     sut      = new FuzzyDictionary <TestKey, TestValue>(fuzzy, keyFactory, valueFactory, count);
 }
Beispiel #3
0
 public void CreateDictionaryOfExistingElementsWithCountSpecification()
 {
     var existing = new Dictionary <int, string> {
         [41] = "foo", [42] = "bar", [43] = "baz"
     };
     Dictionary <int, string> selected = fuzzy.Dictionary(existing, Count.Between(2, 3));
 }
Beispiel #4
0
        public void ControlListCount()
        {
            List <int> values;

            values = fuzzy.List(fuzzy.Int32, Count.Exactly(42));
            values = fuzzy.List(fuzzy.Int32, Count.Between(41, 43));
            values = fuzzy.List(fuzzy.Int32, Count.Max(43));
            values = fuzzy.List(fuzzy.Int32, Count.Min(5));
        }
Beispiel #5
0
        public void ControlDictionaryCount()
        {
            Dictionary <int, string> dictionary;

            dictionary = fuzzy.Dictionary(fuzzy.Int32, fuzzy.String, Count.Exactly(42));
            dictionary = fuzzy.Dictionary(fuzzy.Int32, fuzzy.String, Count.Between(41, 43));
            dictionary = fuzzy.Dictionary(fuzzy.Int32, fuzzy.String, Count.Max(43));
            dictionary = fuzzy.Dictionary(fuzzy.Int32, fuzzy.String, Count.Min(5));
        }
Beispiel #6
0
 public void CreateListOfCustomElementsWithCountConstraints()
 {
     List <int> values = fuzzy.List(() => Environment.TickCount, Count.Between(42, 43));
 }
Beispiel #7
0
 public void CreateListOfExistingElementsWithCountConstraints()
 {
     IEnumerable <int> existing = new[] { 41, 42, 43, 44, 45 };
     List <int>        selected = fuzzy.List(existing, Count.Between(2, 4));
 }
Beispiel #8
0
 public void CreateListOfFuzzyElementsWithCountSpecification()
 {
     List <int> values = fuzzy.List(fuzzy.Int32, Count.Between(41, 43));
 }
Beispiel #9
0
 public void CreateArrayOfCustomElementsWithCountSpecification()
 {
     int key = Environment.TickCount;
     Dictionary <int, string> values = fuzzy.Dictionary(() => key++, k => $"value{k}", Count.Between(42, 43));
 }
Beispiel #10
0
 public void CreateDictionaryOfFuzzyElementsWithCountSpecification()
 {
     Dictionary <int, string> values = fuzzy.Dictionary(fuzzy.Int32, fuzzy.String, Count.Between(41, 43));
 }