Beispiel #1
0
        public void TestGetDocumentStatistics()
        {
            var localName  = "test_multi_pages.docx";
            var remoteName = "TestGetDocumentStatistics.docx";
            var fullName   = Path.Combine(this.dataFolder, remoteName);

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

            var request = new GetDocumentStatisticsRequest(remoteName, this.dataFolder);
            var actual  = this.WordsApi.GetDocumentStatistics(request);

            Assert.AreEqual(200, actual.Code);
        }
        public void TestGetDocumentStatistics()
        {
            string remoteFileName = "TestGetDocumentStatistics.docx";

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

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

            Assert.NotNull(actual.StatData);
            Assert.AreEqual(10, actual.StatData.WordCount);
        }