diff options
Diffstat (limited to 'src/test/java/protocols')
| -rw-r--r-- | src/test/java/protocols/VSAbstractProtocolTest.java | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/test/java/protocols/VSAbstractProtocolTest.java b/src/test/java/protocols/VSAbstractProtocolTest.java index 9233565..b93cae4 100644 --- a/src/test/java/protocols/VSAbstractProtocolTest.java +++ b/src/test/java/protocols/VSAbstractProtocolTest.java @@ -7,7 +7,6 @@ import core.VSTask; import events.VSAbstractEvent; import events.internal.VSProtocolScheduleEvent; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mock; @@ -361,30 +360,4 @@ class VSAbstractProtocolTest { verify(mockOutputStream, atLeast(1)).writeObject(Boolean.TRUE); // hasOnServerStart } - @Test - @Disabled("Deserialization with complex inheritance is difficult to mock properly") - void testDeserialization() throws IOException, ClassNotFoundException { - // Testing deserialization with complex inheritance is difficult to mock properly - // Instead, we'll test that the method can be called without throwing exceptions - // and that the parent deserialize is called - - TestProtocol spyProtocol = spy(testProtocol); - - // Mock the entire chain to return appropriate values - when(mockInputStream.readObject()) - .thenReturn(new java.util.HashMap<>()) // For VSPrefs - .thenReturn(Boolean.FALSE) // For VSAbstractEvent - .thenReturn("TestClassname") // For VSAbstractEvent - .thenReturn("TestShortname") // For VSAbstractEvent - .thenReturn(Boolean.FALSE) // For VSAbstractEvent - .thenReturn(Boolean.FALSE) // For VSAbstractProtocol - .thenReturn(Boolean.TRUE) // For hasOnServerStart - .thenReturn(Boolean.FALSE); // For VSAbstractProtocol - - // This will call through the entire chain - assertDoesNotThrow(() -> spyProtocol.deserialize(null, mockInputStream)); - - // Verify that readObject was called (at least for our protocol reads) - verify(mockInputStream, atLeast(3)).readObject(); - } }
\ No newline at end of file |
