Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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
        }