示例#1
0
        public void TestGetDictionaryOfPeople()
        {
            var dic = api.GetDictionaryOfPeople();

            Assert.Equal("Tony Stark", dic["iron Man"].Name);
            Assert.Equal("New York", dic["spider Man"].Addresses[0].City);
        }
示例#2
0
        public void TestGetDictionaryOfPeople()
        {
            var dic = api.GetDictionaryOfPeople();

            Assert.Throws <KeyNotFoundException>(() => dic["iron Man"].Name);
            Assert.Equal("New York", dic["Spider Man"].Addresses[0].City);
        }
示例#3
0
        public void TestGetDictionaryOfPeople()
        {
            var dic = api.GetDictionaryOfPeople();

            Assert.Equal("Tony Stark", dic["Iron Man"].Name);
            Assert.Equal("New York", dic["Spider Man"].Addresses[0].City);
            Assert.Throws <System.Collections.Generic.KeyNotFoundException>(() => dic["iron Man"].Name);              //the camelCase filter is in play in the web api
        }