public void AddDogTest() { var dog = new DogBuilder().Roxy().Build(); var adapter = new DogAdapterStub(); var newDog = adapter.AddDog(dog); Assert.AreEqual(dog.Name, newDog.Name); }
/// <summary> /// Adds the dog. /// </summary> /// <param name="dog">The dog.</param> /// <returns>The dog</returns> public ResponseItem<Dog> AddDog(Dog dog) { var adapter = new DogAdapterStub(); var newDog = adapter.AddDog(dog); var result = (newDog != null) ? ResultCodeEnum.Success : ResultCodeEnum.NotFound; return new ResponseItem<Dog>(result) { Data = newDog }; }