Beispiel #1
0
        public async Task Should_Insert_President_With_Success()
        {
            // Act
            await _whiteHouseAppService.InsertPresidentAsync(new PresidentDto("1", "New President", new Address("Rua de teste", "123", "APT 12", new ZipCode("12345678"))));

            // Assert
            Assert.False(LocalNotification.HasNotification());
        }
Beispiel #2
0
        public async Task <IActionResult> Post([FromBody] PresidentDto president)
        {
            var response = await _whiteHouseAppService.InsertPresidentAsync(president);

            return(CreateResponse <PresidentDto, string>()
                   .FromErrorEnum(PresidentDto.Error.PostPresident)
                   .WithMessage(AppConsts.LocalizationSourceName, PresidentDto.Error.PostPresident)
                   .WithDto(response)
                   .Build());
        }