public async Task Current_throws_before_first() { var generator = new PrimeGenerator(); await using var enumerator = generator.GetAsyncEnumerator(); enumerator.Invoking(e => e.Current).Should().Throw <InvalidOperationException>("you cannot get current before move next"); }