-
-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathGzipDebugTest.java
More file actions
24 lines (19 loc) · 889 Bytes
/
GzipDebugTest.java
File metadata and controls
24 lines (19 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package burp;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class GzipDebugTest extends BaseHackvertorTest {
@Test
void testSimpleGzipCompress() {
String input = "test";
String compressed = hackvertor.convert("<@gzip_compress>" + input + "</@gzip_compress>", hackvertor);
assertNotNull(compressed, "Compression should not return null");
assertFalse(compressed.startsWith("Error:"), "Should not have error: " + compressed);
}
@Test
void testGzipRoundTrip() {
String input = "Hello World!";
String compressed = hackvertor.convert("<@gzip_compress>" + input + "</@gzip_compress>", hackvertor);
String decompressed = hackvertor.convert("<@gzip_decompress>" + compressed + "</@gzip_decompress>", hackvertor);
assertEquals(input, decompressed);
}
}