mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-02 11:36:22 +01:00
Land #462, simplify test assertions
This commit is contained in:
commit
9ba15b0ead
@ -62,8 +62,8 @@ public class MeterpreterTest extends TestCase {
|
|||||||
byte[] roundtripData = new byte[4096];
|
byte[] roundtripData = new byte[4096];
|
||||||
in.readFully(roundtripData);
|
in.readFully(roundtripData);
|
||||||
Assert.assertEquals(new String(randomData, "ISO-8859-1"), new String(roundtripData, "ISO-8859-1"));
|
Assert.assertEquals(new String(randomData, "ISO-8859-1"), new String(roundtripData, "ISO-8859-1"));
|
||||||
Assert.assertEquals(true, in.readBoolean());
|
Assert.assertTrue(in.readBoolean());
|
||||||
Assert.assertEquals(true, in.readBoolean());
|
Assert.assertTrue(in.readBoolean());
|
||||||
Assert.assertEquals(-1, in.read());
|
Assert.assertEquals(-1, in.read());
|
||||||
|
|
||||||
// test payload with output redirection disabled
|
// test payload with output redirection disabled
|
||||||
@ -73,8 +73,8 @@ public class MeterpreterTest extends TestCase {
|
|||||||
roundtripData = new byte[4096];
|
roundtripData = new byte[4096];
|
||||||
in.readFully(roundtripData);
|
in.readFully(roundtripData);
|
||||||
Assert.assertEquals(new String(randomData, "ISO-8859-1"), new String(roundtripData, "ISO-8859-1"));
|
Assert.assertEquals(new String(randomData, "ISO-8859-1"), new String(roundtripData, "ISO-8859-1"));
|
||||||
Assert.assertEquals(true, in.readBoolean());
|
Assert.assertTrue(in.readBoolean());
|
||||||
Assert.assertEquals(false, in.readBoolean());
|
Assert.assertFalse(in.readBoolean());
|
||||||
Assert.assertEquals(-1, in.read());
|
Assert.assertEquals(-1, in.read());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user