public void CompressGzip_Success_UnderThreshold() { var id = new Guid("209EBBA5-F195-495F-BA68-48C32173BEC5"); var model = new ExampleJsonModel(id, new List <string> { "a", "b" }); var serialised = JsonWorker.Serialize(model); var compressed = JsonCompressor.Compress(serialised, Compressor.Gzip); Assert.Equal("{\"identifier\":\"" + id + "\",\"list\":[\"a\",\"b\"]}", compressed); }
public void CompressGzip_Success() { var id = new Guid("209EBBA5-F195-495F-BA68-48C32173BEC5"); var model = new ExampleJsonModel(id, new List <string> { "a", "b" }); var serialised = JsonWorker.Serialize(model); var compressed = JsonCompressor.Compress(serialised, Compressor.Gzip, 10); Assert.DoesNotContain("{\"identifier\":", compressed); }