SEBWIN-219: Forgot test case for DelegateOperation.

This commit is contained in:
dbuechel 2018-03-14 15:39:53 +01:00
parent 5a830bad42
commit b206b0d5be

View file

@ -7,6 +7,7 @@
*/
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SafeExamBrowser.Contracts.Behaviour.OperationModel;
using SafeExamBrowser.Core.Behaviour.OperationModel;
namespace SafeExamBrowser.Core.UnitTests.Behaviour.OperationModel
@ -49,5 +50,19 @@ namespace SafeExamBrowser.Core.UnitTests.Behaviour.OperationModel
Assert.IsTrue(reverted);
}
[TestMethod]
public void MustNotFailIfActionsAreNull()
{
var sut = new DelegateOperation(null, null, null);
var perform = sut.Perform();
var repeat = sut.Repeat();
sut.Revert();
Assert.AreEqual(OperationResult.Success, perform);
Assert.AreEqual(OperationResult.Success, repeat);
}
}
}