示例#1
0
        public static ITestableObserver <T> AssertExceptions <T>(this ITestableObserver <T> observer)
        {
            var errors = observer.Errors();

            if (errors.Any())
            {
                Assert.True(false, string.Format("An exception occured in the observable sequence : {0}, {1}\n{2}",
                                                 errors.First().GetType(),
                                                 errors.First().Message,
                                                 errors.First().StackTrace));
            }
            return(observer);
        }
示例#2
0
 public static void ShouldBeAsyncData <T>(this ITestableObserver <T> observer)
 {
     observer.Errors().Should().BeEmpty("An error occured in the observable");
     observer.Values().Should().HaveCount(1);
     observer.Completed().Should().HaveCount(1);
 }