//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldTimeoutWhenNoContentProvided() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ShouldTimeoutWhenNoContentProvided() { // given FakeClock clock = FakeClock; Stream inputStream = spy(new MockInputStream(new Ticker(clock, 1, TimeUnit.SECONDS))); InputStreamAwaiter awaiter = new InputStreamAwaiter(clock, inputStream); // when assertThrows(typeof(TimeoutException), () => awaiter.awaitLine("important message", 5, TimeUnit.SECONDS)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test void shouldWaitForALineWithoutBlocking() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: internal virtual void ShouldWaitForALineWithoutBlocking() { // given FakeClock clock = FakeClock; Stream inputStream = spy(new MockInputStream(new Ticker(clock, 5, TimeUnit.MILLISECONDS), Lines("important message"))); InputStreamAwaiter awaiter = new InputStreamAwaiter(clock, inputStream); // when awaiter.AwaitLine("important message", 5, TimeUnit.SECONDS); }