SEBWIN-301: Added missing test condition for session initalization operation.

This commit is contained in:
dbuechel 2019-06-19 16:00:34 +02:00
parent ac28eec94a
commit 4087db9097

View file

@ -59,11 +59,17 @@ namespace SafeExamBrowser.Service.UnitTests.Operations
}
[TestMethod]
public void Perform_MustInitializeServiceEvent()
public void Perform_MustCloseOldAndInitializeNewServiceEvent()
{
var stub = new EventStub();
sessionContext.ServiceEvent = stub;
var result = sut.Perform();
Assert.AreEqual(OperationResult.Success, result);
Assert.IsTrue(stub.IsClosed);
Assert.AreNotSame(stub, sessionContext.ServiceEvent);
Assert.IsInstanceOfType(sessionContext.ServiceEvent, typeof(EventWaitHandle));
}