mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-422: Correct toString() for GuacamoleProtocolVersion (must be manually implemented after migrating away from enum). Add unit test for verifying toString().
This commit is contained in:
@@ -203,4 +203,9 @@ public class GuacamoleProtocolVersion {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "VERSION_" + getMajor() + "_" + getMinor() + "_" + getPatch();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -137,4 +137,15 @@ public class GuacamoleProtocolVersionTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Verifies that versions can be converted to their Guacamole protocol
|
||||||
|
* representation through calling toString().
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testToString() {
|
||||||
|
Assert.assertEquals("VERSION_1_0_0", GuacamoleProtocolVersion.VERSION_1_0_0.toString());
|
||||||
|
Assert.assertEquals("VERSION_1_1_0", GuacamoleProtocolVersion.VERSION_1_1_0.toString());
|
||||||
|
Assert.assertEquals("VERSION_12_103_398", new GuacamoleProtocolVersion(12, 103, 398).toString());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user