public void PowerPoint2007OfficeDocumentConstructorTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); PowerPoint2007OfficeDocument_Accessor actual = new PowerPoint2007OfficeDocument_Accessor(this.application.ActivePresentation); Assert.AreEqual(target.FilePath.FullName.ToUpperInvariant(), actual.FilePath.FullName.ToUpperInvariant()); }
public void SaveTestWithFile() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); FileInfo file = new FileInfo("c:\\temp\\demodemo\\demo" + target.DefaultExtension); target.Save(file); }
public void GetAttachmentsTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); ICollection <FileInfo> actual; actual = target.Attachments; Assert.AreEqual(actual.Count, 1); }
public void CustomPropertiesTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); Dictionary <string, string> actual; actual = target.CustomProperties; Assert.AreEqual(actual.Count, 0); }
public void ApplicationVersionTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); string expected = "12.0"; string actual; actual = target.ApplicationVersion; Assert.AreEqual(expected, actual); }
public void DocumentTypeTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); DocumentType expected = DocumentType.PPT; DocumentType actual; actual = target.DocumentType; Assert.AreEqual(expected, actual); }
public void FilePathTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); FileInfo expected = demoDoc; FileInfo actual; actual = target.FilePath; Assert.AreEqual(expected.FullName.ToUpperInvariant(), actual.FullName.ToUpperInvariant()); }
public void SaveCustomPropertiesTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); Dictionary <string, string> properties = new Dictionary <string, string>(); properties.Add("id", "1"); properties.Add("tp", "2"); target.SaveCustomProperties(properties); }
public void DefaultExtensionTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); string actual; actual = target.DefaultExtension; string expected = ".pptx"; Assert.AreEqual(actual, expected); }
public void DocumentFilterTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); string actual; actual = target.DocumentFilter; string expected = "Presentación de PowerPoint (*.pptx)|(*.pptx)"; Assert.AreEqual(actual, expected); }
public void IsNotNewTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); bool actual; actual = target.IsNew; bool expected = false; Assert.AreEqual(actual, expected); }
public void SaveAsHtmlTest() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); DirectoryInfo dir = new DirectoryInfo("c:\\temp\\demoppt\\");; FileInfo expected = new FileInfo(dir.FullName + "\\demo.html"); FileInfo actual; actual = target.SaveAsHtml(dir); Assert.AreEqual(expected.FullName.ToUpperInvariant(), actual.FullName.ToUpperInvariant()); Assert.IsTrue(actual.Exists); }
public void IsNewTest() { PowerPoint.Presentation presentation = this.application.Presentations.Add(Microsoft.Office.Core.MsoTriState.msoTrue); PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(presentation); // TODO: Initialize to an appropriate value bool actual; actual = target.IsNew; bool expected = true; Assert.AreEqual(actual, expected); presentation.Close(); }
public void SaveTestWithOutFile() { PowerPoint2007OfficeDocument_Accessor target = new PowerPoint2007OfficeDocument_Accessor(Open(this.demoDoc)); target.Save(); }