public void GenerateTestusingDefaults() { SpecialList list = new SpecialList(); Dictionary <int, string> newlist = list.Generate(); Assert.IsTrue(newlist.Count == 100); }
public void GenerateTestusing5andFunwithMaxof50() { SpecialList list = new SpecialList(); list.CounterHighlights = new Dictionary <int, string>() { { 5, "Fun" } }; list.Max = 50; Dictionary <int, string> newlist = list.Generate(); Assert.IsTrue(newlist.Count == 50); string outstring = string.Empty; newlist.TryGetValue(5, out outstring); Assert.IsTrue(outstring == "Fun"); }
private static void Main(string[] args) { SpecialList specialList = new SpecialList { Max = 1000, CounterHighlights = new Dictionary <int, string>() { { 5, "Fun" }, { 6, "More Fun" } } }; Dictionary <int, string> list = specialList.Generate(); foreach (var item in list) { Console.WriteLine(item.Value); } Console.ReadLine(); }