public void Realocao_Deveria_atualizar_Os_Dados_De_Reuniao() { //Arrange List <Reuniao> reunioesSala = ReuniaoObjectMother.DefaultList; _reuniaoRepositoryMockObject.Setup(p => p.GetReuniaoBySalaId(It.IsAny <long>())).Returns(reunioesSala); _salaFake.Setup(s => s.ConsultarDisponibilidadeSala(It.IsAny <List <Reuniao> >(), It.IsAny <Reuniao>())); _reuniaoRepositoryMockObject.Setup(p => p.Update(It.IsAny <Reuniao>())); //Action Action actionReuniaoUpdate = () => { _Reunioeservice.Realocacao(_reuniaoDefaultWithId); }; //Assert actionReuniaoUpdate.Should().NotThrow <Exception>(); }
public void Sistema_Deveria_Alterar_Um_Reuniao_Pelo_Id() { //Arrange Reuniao resultReuniao = _reuniaoService.Alocacao(_reuniaoDefault); resultReuniao.Sala.Id = 2; //Action _reuniaoService.Realocacao(resultReuniao); //Assert Reuniao resultGet = _reuniaoService.Get(resultReuniao.Id); resultGet.Should().NotBeNull(); resultGet.Id.Should().Be(resultReuniao.Id); resultGet.Sala.Id.Should().Be(2); }