mirror of
https://github.com/Cysharp/R3.git
synced 2026-10-27 21:58:24 +08:00
22 lines
462 B
C#
22 lines
462 B
C#
namespace R3.Tests.OperatorTests;
|
|
|
|
public class OnErrorResumeAsFailureTest
|
|
{
|
|
|
|
[Fact]
|
|
public void OnErrorResumeAsFailure()
|
|
{
|
|
var subject = new Subject<int>();
|
|
var list = subject.OnErrorResumeAsFailure().ToLiveList();
|
|
|
|
|
|
subject.OnNext(10);
|
|
subject.OnErrorResume(new Exception("foo"));
|
|
|
|
list.AssertEqual([10]);
|
|
list.AssertIsCompleted();
|
|
list.Result.Exception!.Message.ShouldBe("foo");
|
|
|
|
}
|
|
}
|