1
mirror of https://github.com/rapid7/metasploit-payloads synced 2024-12-27 08:33:43 +01:00

Land #462, simplify test assertions

This commit is contained in:
Tim W 2021-02-12 15:45:57 +00:00
commit 9ba15b0ead
No known key found for this signature in database
GPG Key ID: 217FBA50ABBAABEF

View File

@ -62,8 +62,8 @@ public class MeterpreterTest extends TestCase {
byte[] roundtripData = new byte[4096];
in.readFully(roundtripData);
Assert.assertEquals(new String(randomData, "ISO-8859-1"), new String(roundtripData, "ISO-8859-1"));
Assert.assertEquals(true, in.readBoolean());
Assert.assertEquals(true, in.readBoolean());
Assert.assertTrue(in.readBoolean());
Assert.assertTrue(in.readBoolean());
Assert.assertEquals(-1, in.read());
// test payload with output redirection disabled
@ -73,8 +73,8 @@ public class MeterpreterTest extends TestCase {
roundtripData = new byte[4096];
in.readFully(roundtripData);
Assert.assertEquals(new String(randomData, "ISO-8859-1"), new String(roundtripData, "ISO-8859-1"));
Assert.assertEquals(true, in.readBoolean());
Assert.assertEquals(false, in.readBoolean());
Assert.assertTrue(in.readBoolean());
Assert.assertFalse(in.readBoolean());
Assert.assertEquals(-1, in.read());
}
}