public void CreateDog_Test() { IDog newDog = _racetrack.CreateDog(DogBreedEnum.Greyhound); var result = (newDog).GetType(); newDog.Should().BeOfType(typeof(Dog)); newDog.Should().NotBeNull(); }
public Notification Execute(object obj = null) { List <Image> dogImages = (List <Image>)obj; var notification = new Notification(); var totalDogs = _racetrack.GetAllDogsInRacetrack().Count; if (totalDogs < maxNumberOfDogsInRacetrack) { IDog newDog = _racetrack.CreateDog(DogBreedEnum.Greyhound); newDog.DogImage = dogImages[totalDogs]; _racetrack.AddDogToRacetrack(newDog); notification.Code = NotificationEnum.Ok; notification.Description = AllNotifications.NewDogToRacetrackOk(newDog.Name.ToString()); notification.Items = _racetrack.GetAllDogsInRacetrack().Count(); return(notification); } notification.Code = NotificationEnum.Warning; notification.Description = AllNotifications.NewDogToRacetrackWarning(); notification.Items = totalDogs; return(notification); }