public async Task InvokeAsync_fileName_NULL_Expected_Result_0() { TestConsole console = new TestConsole(); Dataformat format = Dataformat.Json; string fileName = null; ExportCommand command = new ExportCommand(fileName, format, _store, _logger, _data); var result = await command.InvAsync(console); Assert.AreEqual(0, result); }
public async Task InvokeAsync_fileName_format_Expected_Result_1_and_File() { TestConsole console = new TestConsole(); Dataformat format = Dataformat.Json; string fileName = "test_export"; ExportCommand command = new ExportCommand(fileName, format, _store, _logger, _data); var result = await command.InvAsync(console); Assert.AreEqual(1, result); Assert.IsTrue(File.Exists("data/" + fileName + ".json")); File.Delete("data/" + fileName + ".json"); }