Пример #1
0
        public void TestGetDogFalseId(string id, int index)
        {
            var dogService = new DogService();

            dogService.PostDog(_dogList[index]);

            Assert.Throws <Exception>(() => dogService.GetDog(id));
        }
Пример #2
0
        public void TestGetDog(int index)
        {
            var dogService = new DogService();

            dogService.PostDog(_dogList[index]);
            var result = dogService.GetDog(_dogList[index].Id);

            Assert.AreEqual(_dogList[index], result);
        }
Пример #3
0
        public void TestGetDogNullOrEmptyId(string id)
        {
            var dogService = new DogService();

            Assert.Throws <Exception>(() => dogService.GetDog(id));
        }