Exemplo n.º 1
0
        public async Task KeyValues()
        {
            var contactTypes = new ContactType();
            var keyValues    = await contactTypes.KeyValuesAsync();

            int    count   = 0;
            int    oldId   = 0;
            string oldName = null;

            foreach (var keyValue in keyValues)
            {
                int id = int.Parse(keyValue.Key);
                Assert.Greater(id, oldId);
                oldId = id;
                Assert.False(string.IsNullOrEmpty(keyValue.Value));
                Assert.AreNotEqual(oldName, keyValue.Value);
                oldName = keyValue.Value;
                count++;
            }
            Assert.AreEqual(20, count);
        }