SEBWIN-679: Extended unit tests for core library.
This commit is contained in:
parent
8543c81867
commit
940baae655
1 changed files with 13 additions and 1 deletions
|
@ -11,8 +11,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using Moq;
|
using Moq;
|
||||||
using SafeExamBrowser.Core.Contracts.OperationModel;
|
using SafeExamBrowser.Core.Contracts.OperationModel;
|
||||||
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
|
using SafeExamBrowser.Core.Contracts.OperationModel.Events;
|
||||||
using SafeExamBrowser.I18n.Contracts;
|
|
||||||
using SafeExamBrowser.Core.Operations;
|
using SafeExamBrowser.Core.Operations;
|
||||||
|
using SafeExamBrowser.I18n.Contracts;
|
||||||
|
|
||||||
namespace SafeExamBrowser.Core.UnitTests.Operations
|
namespace SafeExamBrowser.Core.UnitTests.Operations
|
||||||
{
|
{
|
||||||
|
@ -147,5 +147,17 @@ namespace SafeExamBrowser.Core.UnitTests.Operations
|
||||||
operationMock.Verify(o => o.Perform(), Times.Once);
|
operationMock.Verify(o => o.Perform(), Times.Once);
|
||||||
operationMock.Verify(o => o.Revert(), Times.Once);
|
operationMock.Verify(o => o.Revert(), Times.Once);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void MustNotFailOnEventRegistrationWithoutOperation()
|
||||||
|
{
|
||||||
|
var sut = new LazyInitializationOperation(() => default);
|
||||||
|
|
||||||
|
sut.ActionRequired += default;
|
||||||
|
sut.StatusChanged += default;
|
||||||
|
|
||||||
|
sut.ActionRequired -= default;
|
||||||
|
sut.StatusChanged -= default;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue