public void TestGetOfficeMathObjects()
        {
            var localName  = "MathObjects.docx";
            var remoteName = "TestGetOfficeMathObjects.docx";
            var fullName   = Path.Combine(this.dataFolder, remoteName);

            this.StorageApi.PutCreate(fullName, null, null, File.ReadAllBytes(BaseTestContext.GetDataDir(this.mathObjectFolder) + localName));

            var request = new GetOfficeMathObjectsRequest(remoteName, this.dataFolder);
            var actual  = this.WordsApi.GetOfficeMathObjects(request);

            Assert.AreEqual(200, actual.Code);
        }
Esempio n. 2
0
        public void TestGetOfficeMathObjectsWithoutNodePath()
        {
            string remoteFileName = "TestGetOfficeMathObjectsWithoutNodePath.docx";

            this.UploadFileToStorage(
                remoteDataFolder + "/" + remoteFileName,
                null,
                null,
                File.ReadAllBytes(LocalTestDataFolder + localFile)
                );

            var request = new GetOfficeMathObjectsRequest(
                name: remoteFileName,
                folder: remoteDataFolder
                );
            var actual = this.WordsApi.GetOfficeMathObjects(request);

            Assert.NotNull(actual.OfficeMathObjects);
            Assert.NotNull(actual.OfficeMathObjects.List);
            Assert.AreEqual(16, actual.OfficeMathObjects.List.Count);
            Assert.AreEqual("0.0.0.0", actual.OfficeMathObjects.List[0].NodeId);
        }