public void Test_02_GetHighRiskElementsAndTheirApplications() { PDFCleanActionPropertySet cleanProperties = new PDFCleanActionPropertySet(); SortedList<string, PDFCleanActionPropertySet.TargetApplication> properties = cleanProperties.RatedRiskPropertyTargetSet; Assert.AreEqual(4, properties.Count, "There should be 4 risk rated elements defined."); Assert.IsTrue(properties.ContainsKey(PDFCleanOption.Properties), "Risk rated properties should include Properties"); Assert.IsTrue(properties.ContainsKey(PDFCleanOption.Attachments), "Risk rated properties should include Attachmentss"); Assert.IsTrue(properties.ContainsKey(PDFCleanOption.Bookmarks), "Risk rated properties should include Bookmarks"); Assert.IsTrue(properties.ContainsKey(PDFCleanOption.Markups), "Risk rated properties should include Markups"); Assert.IsTrue(properties[PDFCleanOption.Properties] == (PDFCleanActionPropertySet.TargetApplication.PDFApp), "Properties are meant for PDF"); Assert.IsTrue(properties[PDFCleanOption.Attachments] == (PDFCleanActionPropertySet.TargetApplication.PDFApp), "Properties are meant for PDF"); Assert.IsTrue(properties[PDFCleanOption.Bookmarks] == (PDFCleanActionPropertySet.TargetApplication.PDFApp), "Properties are meant for PDF"); Assert.IsTrue(properties[PDFCleanOption.Markups] == (PDFCleanActionPropertySet.TargetApplication.PDFApp), "Properties are meant for PDF"); // Now test the copy constructor cleanProperties = new PDFCleanActionPropertySet(cleanProperties); properties = cleanProperties.RatedRiskPropertyTargetSet; Assert.AreEqual(4, properties.Count, "There should be 4 Risk rated elements defined."); Assert.IsTrue(properties.ContainsKey(PDFCleanOption.Properties), "Risk rated properties should include Properties"); Assert.IsTrue(properties.ContainsKey(PDFCleanOption.Attachments), "Risk rated properties should include Attachmentss"); Assert.IsTrue(properties.ContainsKey(PDFCleanOption.Bookmarks), "Risk rated properties should include Bookmarks"); Assert.IsTrue(properties.ContainsKey(PDFCleanOption.Markups), "Risk rated properties should include Markups"); Assert.IsTrue(properties[PDFCleanOption.Properties] == (PDFCleanActionPropertySet.TargetApplication.PDFApp), "Properties are meant for PDF"); Assert.IsTrue(properties[PDFCleanOption.Attachments] == (PDFCleanActionPropertySet.TargetApplication.PDFApp), "Properties are meant for PDF"); Assert.IsTrue(properties[PDFCleanOption.Bookmarks] == (PDFCleanActionPropertySet.TargetApplication.PDFApp), "Properties are meant for PDF"); Assert.IsTrue(properties[PDFCleanOption.Markups] == (PDFCleanActionPropertySet.TargetApplication.PDFApp), "Properties are meant for PDF"); }
public void Test_05_ListMetawallProperties() { PDFCleanActionPropertySet cleanProperties = new PDFCleanActionPropertySet(); List<string> properties = cleanProperties.GetPropertyList(); Assert.AreEqual(4, properties.Count, "There should be 4 metawall properties"); Assert.IsTrue(properties.Contains(PDFCleanOption.Properties), "Risk rated properties should include Properties"); Assert.IsTrue(properties.Contains(PDFCleanOption.Attachments), "Risk rated properties should include Attachmentss"); Assert.IsTrue(properties.Contains(PDFCleanOption.Bookmarks), "Risk rated properties should include Bookmarks"); Assert.IsTrue(properties.Contains(PDFCleanOption.Markups), "Risk rated properties should include Markups"); }
public void Test_01_Initialization() { PDFCleanActionPropertySet cleanProperties = new PDFCleanActionPropertySet(); Assert.AreEqual(8, cleanProperties.Count, "There should be exactly 8 properties here."); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.AllowOverride), "Failed to find AllowOverride property"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Execute), "Failed to find Execute"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Properties), "Failed to find Properties"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Attachments), "Failed to find Attachments"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Bookmarks), "Failed to find Bookmarks"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Markups), "Failed to find Markups"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.ModifiesContents), "Failed to find ModifiesContents"); // Now test the copy constructor cleanProperties = new PDFCleanActionPropertySet(cleanProperties); Assert.AreEqual(8, cleanProperties.Count, "There should be exactly 8 properties here."); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.AllowOverride), "Failed to find AllowOverride property"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Execute), "Failed to find Execute"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Properties), "Failed to find Properties"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Attachments), "Failed to find Attachments"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Bookmarks), "Failed to find Bookmarks"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.Markups), "Failed to find Markups"); Assert.IsTrue(cleanProperties.ContainsKey(PDFCleanOption.ModifiesContents), "Failed to find ModifiesContents"); }
public void Test_12_AcceptsOnlyPDFeFileTypes() { PDFCleanActionPropertySet properties = new PDFCleanActionPropertySet(); PDFCleanUserControl ctrl = new PDFCleanUserControl(); PDFCleanUIController controller = new PDFCleanUIController(ctrl, properties, ".docx"); }
public void Test_01_AcceptsOnlyOfficeFileTypes() { PDFCleanActionPropertySet properties = new PDFCleanActionPropertySet(); PDFCleanUserControl ctrl = new PDFCleanUserControl(); PDFCleanUIController controller = new PDFCleanUIController(ctrl, properties, ".pdf"); }