mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Verify no error log is generated in app tests
This commit is contained in:
parent
6f5076d1ea
commit
0e23dccdbc
@ -66,4 +66,10 @@ public static class AppTestHelper
|
||||
Assert.NotEqual(IntPtr.Zero, process.MainWindowHandle);
|
||||
Assert.True(IsWindowVisible(process.MainWindowHandle));
|
||||
}
|
||||
|
||||
public static void AssertNoErrorLog(string appData)
|
||||
{
|
||||
var path = Path.Combine(appData, "NAPS2", "errorlog.txt");
|
||||
Assert.False(File.Exists(path));
|
||||
}
|
||||
}
|
@ -15,6 +15,7 @@ public class WinFormsAppTests : ContextualTexts
|
||||
Assert.Equal("Not Another PDF Scanner 2", process.MainWindowTitle);
|
||||
Assert.True(process.CloseMainWindow());
|
||||
Assert.True(process.WaitForExit(1000));
|
||||
AppTestHelper.AssertNoErrorLog(FolderPath);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -17,6 +17,7 @@ public class WorkerAppTests : ContextualTexts
|
||||
string pipeName = $"NAPS2.Worker/{process.Id}";
|
||||
var client = new WorkerServiceAdapter(new NamedPipeChannel(".", pipeName));
|
||||
client.Init(FolderPath);
|
||||
AppTestHelper.AssertNoErrorLog(FolderPath);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user