public void TestDecompressionHappens() { const string expectedValue = "Hello world"; CompressionTable row = new CompressionTable(); row.CompressedBody = expectedValue; row.Save(); CompressionTable row2 = new CompressionTable(row.ID); row2.Load(); try { Assert.AreEqual(expectedValue, row2.CompressedBody.Value); } finally { row.Delete(); } }
public void TestColumnToCompressedColumnAssignments() { const string expectedValue = "Hello world"; CompressionTable row = new CompressionTable(); row.CompressedBody = expectedValue; row.UncompressedBody = row.CompressedBody; row.Save(); CompressionTable row2 = new CompressionTable(); row2.UncompressedBody = row.CompressedBody; row2.CompressedBody = row.UncompressedBody; row2.Save(); CompressionTable row3 = new CompressionTable(row.ID); row3.Load(); CompressionTable row4 = new CompressionTable(row2.ID); row4.Load(); try { Assert.AreEqual(expectedValue, row3.CompressedBody.Value); Assert.AreEqual(expectedValue, row3.UncompressedBody.Value); Assert.AreEqual(expectedValue, row4.CompressedBody.Value); Assert.AreEqual(expectedValue, row4.UncompressedBody.Value); } finally { row.Delete(); row2.Delete(); } }