public void Error_Test2() { Result <string> r = ResultsCustomError.Default(""); Result <string> r2 = ResultsCustomError.Default(""); r.Should().Be(r2); }
public void Error_Test1() { Result r = ResultsCustomError.Default(""); Result r2 = ResultsCustomError.Default(""); r.Should().Be(r2); }
public void Result_Test2() { Result r = Result.Success(); Result e = ResultsCustomError.Default("anything"); Result e2 = ResultsCustomError.Default("anything"); r.Should().Be(Result.Success()); r.Should().NotBe(e); e.Should().Be(e2); e.Should().NotBe(r); }
public async Task Result_Test5() { Result <long> r = ResultsCustomError.Default("error"); var r2 = await r.MapToResultAsync(async l => { if (true == false) { await Task.Delay(10); } return(Result.Success()); }); r2.Should().NotBeNull(); r2.Should().Be((Result)ResultsCustomError.Default("error")); }
public async Task <Result> Execute(BreaksSomethingCommand handled) { await Task.Delay(10); return(ResultsCustomError.Default("Something bad happened!")); }