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