コード例 #1
0
ファイル: GuideTest.cs プロジェクト: tarunchopra/Vs2017-Issue
        /// <summary>
        /// Creates a base Word file for the tests
        /// </summary>
        /// <param name="createFilePath">Create Word file path</param>
        private void Initialize(string createFilePath)
        {
            GeneratedDocument generatedDocument = new GeneratedDocument();

            generatedDocument.CreatePackage(createFilePath);

            this.Log.Pass("Create Power Point file. File path=[{0}]", createFilePath);

            this.testEntities = new TestEntities(createFilePath);
        }
コード例 #2
0
        public void Guide01EditElement()
        {
            using (var stream = new MemoryStream())
            {
                GeneratedDocument.CreatePackage(stream);
                var testEntities = new TestEntities(stream);

                testEntities.EditElement(stream, Log);
                testEntities.VerifyElement(stream, Log);
            }
        }
コード例 #3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public GuideTest(ITestOutputHelper output)
            : base(output)
        {
            string            createFilePath    = GetTestFilePath(generateDocumentFile);
            GeneratedDocument generatedDocument = new GeneratedDocument();

            generatedDocument.CreatePackage(createFilePath);

            Log.Pass("Create Power Point file. File path=[{0}]", createFilePath);

            testEntities = new TestEntities(createFilePath);
        }
コード例 #4
0
        public void Guide03DeleteAddElement()
        {
            using (var stream = new MemoryStream())
            {
                GeneratedDocument.CreatePackage(stream);
                var testEntities = new TestEntities(stream);

                testEntities.DeleteElement(stream, Log);
                testEntities.VerifyDeletedElement(stream, Log);

                testEntities.AddElement(stream, Log);
                testEntities.VerifyAddedElemenet(stream, Log);
            }
        }
コード例 #5
0
ファイル: GuideTest.cs プロジェクト: yuekunge/Open-XML-SDK
        /// <summary>
        /// Creates a base Word file for the tests
        /// </summary>
        /// <param name="createFilePath">Create Word file path</param>
        private void Initialize(string createFilePath)
        {
            try
            {
                GeneratedDocument generatedDocument = new GeneratedDocument();
                generatedDocument.CreatePackage(createFilePath);

                this.Log.Pass("Create Power Point file. File path=[{0}]", createFilePath);

                this.testEntities = new TestEntities(createFilePath);
            }
            catch (Exception e)
            {
                this.Log.Fail(string.Format(e.Message + ". :File path={0}", createFilePath));
            }
        }
コード例 #6
0
ファイル: GuideTest.cs プロジェクト: eriawan/Open-XML-SDK
        /// <summary>
        /// Creates a base Word file for the tests
        /// </summary>
        /// <param name="createFilePath">Create Word file path</param>
        private void Initialize(string createFilePath)
        {
            try
            {
                GeneratedDocument generatedDocument = new GeneratedDocument();
                generatedDocument.CreatePackage(createFilePath);

                this.Log.Pass("Create Power Point file. File path=[{0}]", createFilePath);

                this.testEntities = new TestEntities(createFilePath);
            }
            catch (Exception e)
            {
                this.Log.Fail(string.Format(e.Message + ". :File path={0}", createFilePath));
            }
        }