public void Delete_Deveria_Deletar_Um_Reuniao()
        {
            //Arrange
            _reuniaoRepositoryMockObject.Setup(x => x.Delete(_reuniaoDefaultWithId));

            //Action
            Action reuniaoDeleteAction = () => _Reunioeservice.Delete(_reuniaoDefaultWithId);

            //Assert
            reuniaoDeleteAction.Should().NotThrow <Exception>();
            _reuniaoRepositoryMockObject.Verify(x => x.Delete(_reuniaoDefaultWithId), Times.Once());
            _reuniaoRepositoryMockObject.Verify(x => x.Delete(_reuniaoDefaultWithId));
        }
Ejemplo n.º 2
0
        public void Sistema_Deveria_Deletar_Um_Reuniao_Pelo_Id()
        {
            Reuniao resultReuniao = _reuniaoService.Alocacao(_reuniaoDefault);

            //Action
            _reuniaoService.Delete(resultReuniao);

            //Assert
            Reuniao        resultGet    = _reuniaoService.Get(resultReuniao.Id);
            List <Reuniao> resultGetAll = _reuniaoService.GetAll();

            resultGet.Should().BeNull();
            resultGetAll.Should().HaveCount(0);
        }