public void Sistema_Deveria_Salvar_Um_Novo_Reuniao_E_Retornar_Do_Banco() { //Action-Arrange Reuniao resultReuniao = _reuniaoService.Alocacao(_reuniaoDefault); //Assert resultReuniao.Should().NotBeNull(); resultReuniao.Id.Should().NotBe(0); Reuniao resultGet = _reuniaoService.Get(resultReuniao.Id); resultGet.Should().NotBeNull(); resultGet.Should().Equals(resultReuniao); }
public void Get_Deveria_Retornar_Um_Reuniao() { //Arrange _reuniaoRepositoryMockObject.Setup(p => p.Get(It.IsAny <long>())).Returns(_reuniaoDefaultWithId); //Action Reuniao retornoReuniao = _Reunioeservice.Get(_reuniaoDefaultWithId.Id); //Assert _reuniaoRepositoryMockObject.Verify(p => p.Get(It.IsAny <long>())); _reuniaoRepositoryMockObject.Verify(p => p.Get(It.IsAny <long>()), Times.Once()); retornoReuniao.Id.Should().BeGreaterThan(0); retornoReuniao.Id.Should().Be(_reuniaoDefaultWithId.Id); }