Пример #1
0
        public async Task TC_2_SearchPet()
        {
            var petId = ApiHelper.GeneratePetId().Result;

            await CreateHelper.CreatePet(petId);

            var searchPetId = await CreateHelper.SearchPet(petId);

            Assert.AreEqual(searchPetId, petId.ToString());
        }
Пример #2
0
        public async Task TC_4_DeletePet()
        {
            var petId = ApiHelper.GeneratePetId().Result;

            await CreateHelper.CreatePet(petId);

            await CreateHelper.DeletePet(petId);

            var message = await CreateHelper.SearchPet(petId, shouldFind : false);

            Assert.AreEqual(message, "Pet not found");
        }
Пример #3
0
        public async Task TC_3_UpdatePet()
        {
            var petId       = ApiHelper.GeneratePetId().Result;
            var updatedName = "UpdatedPetName";

            await CreateHelper.CreatePet(petId);

            await CreateHelper.UpdatePet(petId, updatedName);

            var name = await CreateHelper.SearchPet(petId, "name");

            Assert.AreEqual(name, updatedName);
        }