public void NonNumbers() { string nonNumber = "I'm Even"; FunctionTestLogger logger = new FunctionTestLogger(output); Assert.ThrowsAsync <ArgumentException>(async() => await OddOrEvenQueue.RunAsync(nonNumber, logger) ); }
public async Task OddNumberAsync(BigInteger number) { FunctionTestLogger logger = new FunctionTestLogger(output); await OddOrEvenQueue.RunAsync(number.ToString(), logger); var wasOdd = (from l in logger.getLogs() where l.Equals("Was odd") select l).Any(); Assert.True(wasOdd); Assert.Equal("Odd", await request.Content.ReadAsStringAsync()); }