SEBWIN-219: Attempt to fix missing code coverage.
This commit is contained in:
parent
17c068de6f
commit
108ec76e30
1 changed files with 6 additions and 5 deletions
|
@ -14,6 +14,7 @@ using SafeExamBrowser.Contracts.Communication;
|
||||||
using SafeExamBrowser.Contracts.Communication.Messages;
|
using SafeExamBrowser.Contracts.Communication.Messages;
|
||||||
using SafeExamBrowser.Contracts.Communication.Responses;
|
using SafeExamBrowser.Contracts.Communication.Responses;
|
||||||
using SafeExamBrowser.Contracts.Logging;
|
using SafeExamBrowser.Contracts.Logging;
|
||||||
|
using SafeExamBrowser.Core.Communication;
|
||||||
|
|
||||||
namespace SafeExamBrowser.Core.UnitTests.Communication
|
namespace SafeExamBrowser.Core.UnitTests.Communication
|
||||||
{
|
{
|
||||||
|
@ -22,7 +23,7 @@ namespace SafeExamBrowser.Core.UnitTests.Communication
|
||||||
{
|
{
|
||||||
private Mock<IProxyObjectFactory> proxyObjectFactory;
|
private Mock<IProxyObjectFactory> proxyObjectFactory;
|
||||||
private Mock<ILogger> logger;
|
private Mock<ILogger> logger;
|
||||||
private BaseProxyImpl sut;
|
private BaseProxy sut;
|
||||||
|
|
||||||
[TestInitialize]
|
[TestInitialize]
|
||||||
public void Initialize()
|
public void Initialize()
|
||||||
|
@ -138,7 +139,7 @@ namespace SafeExamBrowser.Core.UnitTests.Communication
|
||||||
[ExpectedException(typeof(InvalidOperationException))]
|
[ExpectedException(typeof(InvalidOperationException))]
|
||||||
public void MustFailToSendIfNotConnected()
|
public void MustFailToSendIfNotConnected()
|
||||||
{
|
{
|
||||||
sut.Send(new Mock<Message>().Object);
|
(sut as BaseProxyImpl).Send(new Mock<Message>().Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
@ -159,14 +160,14 @@ namespace SafeExamBrowser.Core.UnitTests.Communication
|
||||||
var token = Guid.NewGuid();
|
var token = Guid.NewGuid();
|
||||||
|
|
||||||
sut.Connect(token);
|
sut.Connect(token);
|
||||||
sut.Send(new Mock<Message>().Object);
|
(sut as BaseProxyImpl).Send(new Mock<Message>().Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
[ExpectedException(typeof(ArgumentNullException))]
|
[ExpectedException(typeof(ArgumentNullException))]
|
||||||
public void MustNotAllowSendingNull()
|
public void MustNotAllowSendingNull()
|
||||||
{
|
{
|
||||||
sut.Send(null);
|
(sut as BaseProxyImpl).Send(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
@ -188,7 +189,7 @@ namespace SafeExamBrowser.Core.UnitTests.Communication
|
||||||
|
|
||||||
var token = Guid.NewGuid();
|
var token = Guid.NewGuid();
|
||||||
var connected = sut.Connect(token);
|
var connected = sut.Connect(token);
|
||||||
var received = sut.Send(message);
|
var received = (sut as BaseProxyImpl).Send(message);
|
||||||
|
|
||||||
Assert.AreEqual(response.Object, received);
|
Assert.AreEqual(response.Object, received);
|
||||||
Assert.AreEqual(connectionResponse.CommunicationToken, message.CommunicationToken);
|
Assert.AreEqual(connectionResponse.CommunicationToken, message.CommunicationToken);
|
||||||
|
|
Loading…
Reference in a new issue