public void IsFileNotOfficePackage() { File.WriteAllText(TestFile, "Not an office package"); Assert.AreEqual(false, OfficeCryptoStream.IsPlaintext(TestFile), "IsPlaintext"); Assert.AreEqual(false, OfficeCryptoStream.IsEncrypted(TestFile), "IsEncrypted"); }
public void TestFormatEncrypted() { CreateTestWorkbook("foo"); Assert.AreEqual(false, OfficeCryptoStream.IsPlaintext(TestFile), "IsPlaintext"); Assert.AreEqual(true, OfficeCryptoStream.IsEncrypted(TestFile), "IsEncrypted"); }
public void IsFilePlaintext() { CreateTestWorkbook(null); Assert.AreEqual(true, OfficeCryptoStream.IsPlaintext(TestFile), "IsPlaintext"); Assert.AreEqual(false, OfficeCryptoStream.IsEncrypted(TestFile), "IsEncrypted"); }