提交 00922d2d 编写于 作者: H huguesv

Add test to make sure that blank input is not added to history.

上级 b884f6b3
......@@ -76,6 +76,29 @@ public async Task CheckHistoryPrevious()
AssertCurrentSubmission(inputString);
}
[WpfFact]
public async Task CheckHistoryPreviousWithAnEmptySubmission() {
//submit, submit, submit, up, up, up
const string inputString1 = "1 ";
const string inputString2 = " ";
const string inputString3 = "3 ";
await InsertAndExecuteInput(inputString1).ConfigureAwait(true);
await InsertAndExecuteInput(inputString2).ConfigureAwait(true);
await InsertAndExecuteInput(inputString3).ConfigureAwait(true);
_operations.HistoryPrevious();
AssertCurrentSubmission(inputString3);
//second input was empty, so it wasn't added to history
_operations.HistoryPrevious();
AssertCurrentSubmission(inputString1);
//has reached the top, no change
_operations.HistoryPrevious();
AssertCurrentSubmission(inputString1);
}
[WpfFact]
public async Task CheckHistoryPreviousNotCircular()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册