void Ja_esta_cancelado_falha() { //ARRANGE var atendimento = new Atendimento(atendimentoRepo, timeProvider, horario, paciente, observacao); timeProvider.Now.Returns(dataCancelamento); atendimento.Cancelar(timeProvider);//Está cancelado //ACT var ex = Should.Throw <DomainException>(() => atendimento.Cancelar(timeProvider)); //ASSERT ex.Message.ShouldBe("Não é possível Cancelar no Status CANC"); }
void Tem_sucesso() { //ARRANGE var atendimento = new Atendimento(atendimentoRepo, timeProvider, horario, paciente, observacao); timeProvider.Now.Returns(dataCancelamento); //ACT atendimento.Cancelar(timeProvider);//Está cancelado //ASSERT atendimento.Status.ShouldBe(TipoStatus.CANC); atendimento.DataCancelamento.ShouldBe(dataCancelamento); }