From c6f8a2ecdcae944d4968abf37357731d0802fbff Mon Sep 17 00:00:00 2001 From: Isira Seneviratne Date: Sun, 2 Aug 2020 18:01:42 +0530 Subject: [PATCH] Fix test compilation errors. --- tests/org/kde/kdeconnect/DeviceTest.java | 5 +++-- tests/org/kde/kdeconnect/NetworkPacketTest.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/org/kde/kdeconnect/DeviceTest.java b/tests/org/kde/kdeconnect/DeviceTest.java index 5c5c203d..103709ef 100644 --- a/tests/org/kde/kdeconnect/DeviceTest.java +++ b/tests/org/kde/kdeconnect/DeviceTest.java @@ -36,6 +36,7 @@ import org.kde.kdeconnect.Backends.BasePairingHandler; import org.kde.kdeconnect.Backends.LanBackend.LanLink; import org.kde.kdeconnect.Backends.LanBackend.LanLinkProvider; import org.kde.kdeconnect.Backends.LanBackend.LanPairingHandler; +import org.kde.kdeconnect.Helpers.DeviceHelper; import org.kde.kdeconnect.Helpers.SecurityHelpers.RsaHelper; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; @@ -145,7 +146,7 @@ public class DeviceTest { NetworkPacket fakeNetworkPacket = new NetworkPacket(NetworkPacket.PACKET_TYPE_IDENTITY); fakeNetworkPacket.set("deviceId", "unpairedTestDevice"); fakeNetworkPacket.set("deviceName", "Unpaired Test Device"); - fakeNetworkPacket.set("protocolVersion", NetworkPacket.ProtocolVersion); + fakeNetworkPacket.set("protocolVersion", DeviceHelper.ProtocolVersion); fakeNetworkPacket.set("deviceType", Device.DeviceType.Phone.toString()); LanLinkProvider linkProvider = Mockito.mock(LanLinkProvider.class); @@ -191,7 +192,7 @@ public class DeviceTest { NetworkPacket fakeNetworkPacket = new NetworkPacket(NetworkPacket.PACKET_TYPE_IDENTITY); fakeNetworkPacket.set("deviceId", "unpairedTestDevice"); fakeNetworkPacket.set("deviceName", "Unpaired Test Device"); - fakeNetworkPacket.set("protocolVersion", NetworkPacket.ProtocolVersion); + fakeNetworkPacket.set("protocolVersion", DeviceHelper.ProtocolVersion); fakeNetworkPacket.set("deviceType", Device.DeviceType.Phone.toString()); fakeNetworkPacket.set("certificate", "MIIDVzCCAj+gAwIBAgIBCjANBgkqhkiG9w0BAQUFADBVMS8wLQYDVQQDDCZfZGExNzlhOTFfZjA2\n" + diff --git a/tests/org/kde/kdeconnect/NetworkPacketTest.java b/tests/org/kde/kdeconnect/NetworkPacketTest.java index affe5bff..1ad0def6 100644 --- a/tests/org/kde/kdeconnect/NetworkPacketTest.java +++ b/tests/org/kde/kdeconnect/NetworkPacketTest.java @@ -91,7 +91,7 @@ public class NetworkPacketTest { NetworkPacket np = NetworkPacket.createIdentityPacket(context); - assertEquals(np.getInt("protocolVersion"), NetworkPacket.ProtocolVersion); + assertEquals(np.getInt("protocolVersion"), DeviceHelper.ProtocolVersion); }