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>();
        }
示例#2
0
 public Task <Result <Exception, Domain.Results.Unit> > Handle(RobotDeleteCommand command, CancellationToken cancellationToken)
 {
     return(Task.FromResult(_repository.Delete(command.RobotId)));
 }