コード例 #1
0
        public void ExcelApplicationConstructorTest()
        {
            ExcelApplication_Accessor target   = new ExcelApplication_Accessor(application);
            OfficeDocument            document = target.Open(this.demoDoc);

            Assert.AreEqual(document.FilePath.FullName.ToUpperInvariant(), demoDoc.FullName.ToUpperInvariant());
        }
コード例 #2
0
        public void ActivateDocumentTest()
        {
            ExcelApplication_Accessor target = new ExcelApplication_Accessor(this.application);

            Excel.Workbook workbook = this.application.Workbooks.Add(System.Type.Missing);
            target.ActivateDocument(workbook);
        }
コード例 #3
0
        public void ApplicationWorkbookOpenTest()
        {
            ExcelApplication_Accessor target = new ExcelApplication_Accessor(this.application);

            Excel.Workbook workbook = this.application.Workbooks.Add(System.Type.Missing);
            target.ApplicationWorkbookOpen(workbook);
        }
コード例 #4
0
        public void ApplicationWorkbookBeforeCloseTest()
        {
            ExcelApplication_Accessor target = new ExcelApplication_Accessor(this.application);

            Excel.Workbook workbook = this.application.Workbooks.Add(System.Type.Missing);
            bool           cancel   = false; // TODO: Initialize to an appropriate value

            target.ApplicationWorkbookBeforeClose(workbook, ref cancel);
        }
コード例 #5
0
        public void OpenTest()
        {
            ExcelApplication_Accessor target = new ExcelApplication_Accessor(this.application);
            FileInfo       file = this.demoDoc;
            OfficeDocument actual;

            actual = target.Open(file);
            Assert.AreEqual(actual.FilePath.FullName.ToUpperInvariant(), file.FullName.ToUpperInvariant());
        }