public async Task Handle_return_false_remove() { AtributosDeleteCommand fakeRequest = new AtributosDeleteCommand(120); //Act var handler = new AtributosDeleteCommandHandler(_repo.Object, _unitofwork.Object, _specification.Object); var cltToken = new System.Threading.CancellationToken(); bool result = await handler.Handle(fakeRequest, cltToken); AtributoDto resulTeorico = FakeAtributoDto(); //Assert Assert.False(result); }
public async Task Handle_return_true_remove() { AtributosDeleteCommand fakeRequest = new AtributosDeleteCommand(120); _repo.Setup(orderRepo => orderRepo.GetElement(It.IsAny <ISpecification <AtributoEntity> >())) .Returns(FakeAtributo()); //Act var handler = new AtributosDeleteCommandHandler(_repo.Object, _unitofwork.Object, _specification.Object); var cltToken = new System.Threading.CancellationToken(); bool result = await handler.Handle(fakeRequest, cltToken); AtributoDto resulTeorico = FakeAtributoDto(); //Assert Assert.True(result); }