Esempio n. 1
0
        public void CreatePetImageReturnsFalseForNullFilename()
        {
            //Arrange
            var mockPetAccessor = new PetAccessorMock();
            var petManager      = new PetManager(mockPetAccessor);
            //Act
            var result = petManager.AddPetImageFilename(null, 100100);

            //Assert
            Assert.IsFalse(result);
        }
Esempio n. 2
0
        public void CanCreatePetImage()
        {
            //Arrange
            var mockPetAccessor = new PetAccessorMock();
            var petManager      = new PetManager(mockPetAccessor);
            Pet newPet          = new Pet();

            newPet.PetID         = 100099;
            newPet.imageFilename = "pet999.jpg";
            //Act
            petManager.CreatePet(newPet);
            var result = petManager.AddPetImageFilename(newPet.imageFilename, newPet.PetID);

            //Assert
            Assert.IsTrue(result);
        }