Exemplo n.º 1
0
        public void GivenGetCharactersUseCaseReturnedCharacters_ShouldReturnCharacters_WhenCalled()
        {
            _getCharactersUseCaseMock.Setup(useCase => useCase.Execute())
            .Returns(CharacterFixture.BuildListOfSingleHumanCharacters());

            var characters = _characterController.GetCharacters();

            characters.Should().BeEquivalentTo(CharacterDtoFixture.BuildList());
        }
Exemplo n.º 2
0
        public void GivenGetCharacterByIdUseCaseReturnedNotHumanCharacter_ShouldReturnNotHumanCharacterDto_WhenCalledWithId()
        {
            _getCharacterByIdUseCaseMock.Setup(useCase => useCase.ExecuteWith(It.Is <int>(id => CharacterId == id)))
            .Returns(CharacterFixture.BuildNotHumanCharacter());

            var characters = _characterController.GetCharacterById(CharacterId);

            characters.Should().BeEquivalentTo(CharacterDtoFixture.BuildNotHumanCharacterDto());
        }