From 43b3fdd933f5dcba0ea00bb8950132d3dfb98e6e Mon Sep 17 00:00:00 2001 From: Marco Gruhl Date: Tue, 10 Jan 2023 14:26:54 +0100 Subject: [PATCH] Rewrite tests to run with essential access Add Output for TestStreamCancellation streamResult --- test/TestStream.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/TestStream.cs b/test/TestStream.cs index 88576a6..ccb7195 100644 --- a/test/TestStream.cs +++ b/test/TestStream.cs @@ -130,7 +130,7 @@ public async Task TestStreamCancellation() await Task.Delay(25); } - Assert.IsTrue(streamResult == TaskStatus.RanToCompletion); + Assert.IsTrue(streamResult == TaskStatus.RanToCompletion, streamResult.ToString()); } [TestMethod] @@ -139,7 +139,7 @@ public async Task TestStreamErrorRule() var client = new TwitterClient(Environment.GetEnvironmentVariable("TWITTER_TOKEN")); // Faulty expression - var expression = Expression.Keyword("Faulty expression").And(Expression.PlaceCountry("xxxx")); + var expression = Expression.Keyword("Faulty expression").And(Expression.Sample(200)); try { @@ -154,7 +154,7 @@ public async Task TestStreamErrorRule() } // double faulty expression - var expression2 = Expression.Keyword("double faulty expression").And(Expression.PlaceCountry("xxxx"), Expression.Sample(200)); + var expression2 = Expression.Keyword("double faulty expression").And(Expression.FollowersCount(-100), Expression.Sample(200)); try {