コード例 #1
0
        public void CanCreatePresentationFromTemplate()
        {
            using (var packageDocument = PresentationDocument.CreateFromTemplate(PresentationTemplatePath))
            {
                var part = packageDocument.PresentationPart;
                var root = part.Presentation;

                packageDocument.SaveAs(PresentationPath).Close();

                // We are fine if we have not run into an exception.
                Assert.True(true);
            }
        }
コード例 #2
0
        public void CanCreatePresentationFromTemplate()
        {
            using (var stream = OpenFile(TestFiles.Templates.Presentation, FileAccess.ReadWrite))
                using (var packageDocument = PresentationDocument.CreateFromTemplate(stream.Path))
                {
                    var part = packageDocument.PresentationPart;
                    var root = part.Presentation;

                    packageDocument.SaveAs(Path.GetTempFileName()).Close();

                    // We are fine if we have not run into an exception.
                    Assert.True(true);
                }
        }