Exemple #1
0
        public void GetAnimalState_ShouldReturnUnahppy_WhenValidUnhappyValues()
        {
            Animal animal = new Animal()
            {
                AnimalTypeId = 1,
                Happiness    = 0,
                Hunger       = 80,
                Id           = 1,
                LastChecked  = DateTime.MinValue,
                Name         = "Molly",
                UserId       = 1
            };

            AnimalDataTypes.AnimalState animalState = animalStateManager.GetAnimalState(animal);

            Assert.IsNotNull(animalState);
            Assert.AreEqual(AnimalDataTypes.AnimalState.Unhappy, animalState);
        }
Exemple #2
0
        public void GetAnimalState_ShouldReturnEuphoric_WhenValidEuphoricValues()
        {
            Animal animal = new Animal()
            {
                AnimalTypeId = 1,
                Happiness    = 87,
                Hunger       = 9,
                Id           = 1,
                LastChecked  = DateTime.MinValue,
                Name         = "Molly",
                UserId       = 1
            };

            AnimalDataTypes.AnimalState animalState = animalStateManager.GetAnimalState(animal);

            Assert.IsNotNull(animalState);
            Assert.AreEqual(AnimalDataTypes.AnimalState.Euphoric, animalState);
        }