Exemplo n.º 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");
 }
Exemplo n.º 2
0
 public void TestFormatEncrypted()
 {
     CreateTestWorkbook("foo");
     Assert.AreEqual(false, OfficeCryptoStream.IsPlaintext(TestFile), "IsPlaintext");
     Assert.AreEqual(true, OfficeCryptoStream.IsEncrypted(TestFile), "IsEncrypted");
 }
Exemplo n.º 3
0
 public void IsFilePlaintext()
 {
     CreateTestWorkbook(null);
     Assert.AreEqual(true, OfficeCryptoStream.IsPlaintext(TestFile), "IsPlaintext");
     Assert.AreEqual(false, OfficeCryptoStream.IsEncrypted(TestFile), "IsEncrypted");
 }