This can be easily demonstrated by the following UT:
[Fact]
public void TestOnClientAndServerSetupWhenClientIsFaster()
{
var ints = new List<int>();
var completeInteger = NewEmptyCompletes<int>().AndThen(i =>
{
ints.Add(i);
return i;
}).Repeat();
var expected = Enumerable.Range(0, 1000).ToList();
var server = new Thread(() => expected.ForEach(i => completeInteger.With(i)));
server.Start();
server.Join();
var intHashSet = new HashSet<int>(ints);
var expectedHashSet = new HashSet<int>(expected);
expectedHashSet.RemoveWhere(h => intHashSet.Contains(h));
Assert.Empty(expectedHashSet);
}
Here Repeat() is only executed one time where it should be executed every time an output is set.
This can be easily demonstrated by the following UT:
Here
Repeat()
is only executed one time where it should be executed every time an output is set.