FuzzyListTest() { minCount = 1 + random.Next() % 10; maxCount = minCount + 1 + random.Next() % 10; itemCount = Count.Between(minCount, maxCount); sut = new FuzzyList <TestItem>(fuzzy, itemFactory, itemCount); }
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); }
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)); }
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)); }
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)); }
public void CreateListOfCustomElementsWithCountConstraints() { List <int> values = fuzzy.List(() => Environment.TickCount, Count.Between(42, 43)); }
public void CreateListOfExistingElementsWithCountConstraints() { IEnumerable <int> existing = new[] { 41, 42, 43, 44, 45 }; List <int> selected = fuzzy.List(existing, Count.Between(2, 4)); }
public void CreateListOfFuzzyElementsWithCountSpecification() { List <int> values = fuzzy.List(fuzzy.Int32, Count.Between(41, 43)); }
public void CreateArrayOfCustomElementsWithCountSpecification() { int key = Environment.TickCount; Dictionary <int, string> values = fuzzy.Dictionary(() => key++, k => $"value{k}", Count.Between(42, 43)); }
public void CreateDictionaryOfFuzzyElementsWithCountSpecification() { Dictionary <int, string> values = fuzzy.Dictionary(fuzzy.Int32, fuzzy.String, Count.Between(41, 43)); }