You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Make updates to `FishUntil`
Implement nitpicks from akkadotnet#5430
* Nitpick
* cleaned up `FishUntilMessage`
* removed `FluentAssertions` reference
* fixed bad `TestKit.ReceiveTests`
Copy file name to clipboardExpand all lines: src/core/Akka.TestKit/TestKitBase_Receive.cs
+12-10Lines changed: 12 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@
11
11
usingSystem.Threading;
12
12
usingSystem.Threading.Tasks;
13
13
usingAkka.TestKit.Internal;
14
-
usingFluentAssertions;
15
14
16
15
namespaceAkka.TestKit
17
16
{
@@ -51,27 +50,30 @@ public T FishForMessage<T>(Predicate<T> isMessage, TimeSpan? max = null, string
51
50
varleft=end-Now;
52
51
varmsg=ReceiveOne(left);
53
52
_assertions.AssertTrue(msg!=null,"Timeout ({0}) during fishForMessage{1}",maxValue,string.IsNullOrEmpty(hint)?"":", hint: "+hint);
54
-
if(msgisT&&isMessage((T)msg))
53
+
if(msgisTmsg1&&isMessage(msg1))
55
54
{
56
-
return(T)msg;
55
+
returnmsg1;
57
56
}
58
57
}
59
58
}
60
59
61
60
/// <summary>
62
-
/// Receives messages until <paramref name="max"/>. Ignores all messages except for a message of type <typeparamref name="T"/>. Asserts that all messages are not of the of type <typeparamref name="T"/>. Note that when comparing types, inheritance is ignored, in other words, only perfectly matching types are asserted.
61
+
/// Receives messages until <paramref name="max"/>.
62
+
///
63
+
/// Ignores all messages except for a message of type <typeparamref name="T"/>.
64
+
/// Asserts that all messages are not of the of type <typeparamref name="T"/>.
65
+
/// Note that when comparing types, inheritance is ignored, in other words, only perfectly matching types are asserted.
63
66
/// </summary>
64
67
/// <typeparam name="T">The type that the message is not supposed to be.</typeparam>
0 commit comments