public void Execute_Fail(string description, string json) { TestStore store = new TestStore(json); var command = new CheckCommand(new FileInfo("./fake_file.json"), store); TestConsole console = new TestConsole(); Assert.ThrowsAnyAsync <JwkCheckException>(() => command.InvokeAsync(console)); Assert.True(true, description); }
public async Task Execute_Success(string description, string json) { TestStore store = new TestStore(json); var command = new CheckCommand(new FileInfo("./fake_file.json"), store); TestConsole console = new TestConsole(); await command.InvokeAsync(console); Assert.True(store.WasRead); Assert.Null(store.Output); Assert.False(store.WasWritten); var output = console.Out.ToString() !; Assert.NotEqual(0, output.Length); Assert.True(true, description); }