public void LoopMyDictonaryTestCase() { MyDictonaryClass mydic = new MyDictonaryClass(); foreach (KeyValuePair<int, string> kvp in mydic.getMyDictonary()) { Console.WriteLine("{0} : {1}", kvp.Key, kvp.Value); } }
public void LoopVarMyDictonaryTestCase() { MyDictonaryClass mydic = new MyDictonaryClass(); foreach (var kvp in mydic.getMyDictonary()) { Console.WriteLine("{0} : {1}", kvp.Key, kvp.Value); } }
public void GetMyDictonaryTestCase() { MyDictonaryClass mydic = new MyDictonaryClass(); Dictionary<int, String> dic = mydic.getMyDictonary(); Assert.AreEqual(dic[0],"AAA"); Assert.AreEqual(dic[1],"BBB"); Assert.AreEqual(dic[2],"CCC"); }