From 108ec76e300d9c813bf5d60623df7ebc95678bed Mon Sep 17 00:00:00 2001 From: dbuechel Date: Thu, 15 Mar 2018 10:06:15 +0100 Subject: [PATCH] SEBWIN-219: Attempt to fix missing code coverage. --- .../Communication/BaseProxyTests.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SafeExamBrowser.Core.UnitTests/Communication/BaseProxyTests.cs b/SafeExamBrowser.Core.UnitTests/Communication/BaseProxyTests.cs index 72e120df..a1d55c10 100644 --- a/SafeExamBrowser.Core.UnitTests/Communication/BaseProxyTests.cs +++ b/SafeExamBrowser.Core.UnitTests/Communication/BaseProxyTests.cs @@ -14,6 +14,7 @@ using SafeExamBrowser.Contracts.Communication; using SafeExamBrowser.Contracts.Communication.Messages; using SafeExamBrowser.Contracts.Communication.Responses; using SafeExamBrowser.Contracts.Logging; +using SafeExamBrowser.Core.Communication; namespace SafeExamBrowser.Core.UnitTests.Communication { @@ -22,7 +23,7 @@ namespace SafeExamBrowser.Core.UnitTests.Communication { private Mock proxyObjectFactory; private Mock logger; - private BaseProxyImpl sut; + private BaseProxy sut; [TestInitialize] public void Initialize() @@ -138,7 +139,7 @@ namespace SafeExamBrowser.Core.UnitTests.Communication [ExpectedException(typeof(InvalidOperationException))] public void MustFailToSendIfNotConnected() { - sut.Send(new Mock().Object); + (sut as BaseProxyImpl).Send(new Mock().Object); } [TestMethod] @@ -159,14 +160,14 @@ namespace SafeExamBrowser.Core.UnitTests.Communication var token = Guid.NewGuid(); sut.Connect(token); - sut.Send(new Mock().Object); + (sut as BaseProxyImpl).Send(new Mock().Object); } [TestMethod] [ExpectedException(typeof(ArgumentNullException))] public void MustNotAllowSendingNull() { - sut.Send(null); + (sut as BaseProxyImpl).Send(null); } [TestMethod] @@ -188,7 +189,7 @@ namespace SafeExamBrowser.Core.UnitTests.Communication var token = Guid.NewGuid(); var connected = sut.Connect(token); - var received = sut.Send(message); + var received = (sut as BaseProxyImpl).Send(message); Assert.AreEqual(response.Object, received); Assert.AreEqual(connectionResponse.CommunicationToken, message.CommunicationToken);