public void RepositoryDeleteRobotTest() { //Action var result = repository.Delete("099153c2625149bc8ecb3e85e03f0022"); var resultGet = repository.Get("099153c2625149bc8ecb3e85e03f0022"); //Assert result.IsSuccess.ShouldBeTrue(); resultGet.IsFailure.ShouldBeTrue(); resultGet.Failure.ShouldBeOfType <NotFoundException>(); }
public Task <Result <Exception, Domain.Results.Unit> > Handle(RobotDeleteCommand command, CancellationToken cancellationToken) { return(Task.FromResult(_repository.Delete(command.RobotId))); }