public void ToJson_NoEntry_RightFormat() { Dictionary <string, int> testDictionary = new Dictionary <string, int>(); string result = JsonDictionaryUtility.ToJson(testDictionary); string expected = "{\"keys\":[],\"values\":[]}"; Assert.AreEqual(expected, result); }
public void ToJson_SingleEntry_RightFormat() { Dictionary <string, int> testDictionary = new Dictionary <string, int>(); testDictionary.Add("testKey", 42); string result = JsonDictionaryUtility.ToJson(testDictionary); string expected = "{\"keys\":[\"testKey\"],\"values\":[42]}"; Assert.AreEqual(expected, result); }