Adaptor over System.Net.WebClient Uses plain HTTP calls to send and retrieve data from the XWiki server Service pages on the server are in the MSOffice space
Inheritance: IXWikiClient
コード例 #1
0
 public void AddAttachmentAsyncTest()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     string docName = string.Empty; // TODO: Initialize to an appropriate value
     string filePath = string.Empty; // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.AddAttachmentAsync(docName, filePath);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #2
0
 public void XWikiHTTPClientConstructorTest()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password);
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
コード例 #3
0
 public void WebClientTest()
 {
     string serverURL = "http://localhost:8080";
     string username = "******";
     string password = "******";
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password);
     Assert.IsNotNull(target.WebClient);
 }
コード例 #4
0
 public void UploadValuesTest2()
 {
     string serverURL = "http://localhost:8080";
     string username = "******";
     string password = "******";
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password);
     target.WebClient = new WebClientMock();
     string address = "http://localhost:8080";
     string method = "POST";
     NameValueCollection values = new NameValueCollection();
     byte[] expected = WebClientMock.responseOK;
     byte[] actual;
     actual = target.UploadValues(address, method, values);
     Assert.AreEqual(expected, actual);
 }
コード例 #5
0
 public void UploadDataTest3()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     string address = string.Empty; // TODO: Initialize to an appropriate value
     byte[] data = null; // TODO: Initialize to an appropriate value
     byte[] expected = null; // TODO: Initialize to an appropriate value
     byte[] actual;
     actual = target.UploadData(address, data);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #6
0
 public void ServerURLTest()
 {
     string serverURL = "http://localhost:8080";
     string username = "******";
     string password = "******";
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password);
     string actual = target.ServerURL;
     Assert.IsNotNull(actual);
     Assert.AreEqual(actual, serverURL);
 }
コード例 #7
0
 public void SavePageHTMLTest()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     string docName = string.Empty; // TODO: Initialize to an appropriate value
     string content = string.Empty; // TODO: Initialize to an appropriate value
     string syntax = string.Empty; // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.SavePageHTML(docName, content, syntax);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #8
0
 public void LoginTest()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     string username1 = string.Empty; // TODO: Initialize to an appropriate value
     string password1 = string.Empty; // TODO: Initialize to an appropriate value
     bool expected = false; // TODO: Initialize to an appropriate value
     bool actual;
     actual = target.Login(username1, password1);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #9
0
 public void OpenReadTest1()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     string address = string.Empty; // TODO: Initialize to an appropriate value
     Stream expected = null; // TODO: Initialize to an appropriate value
     Stream actual;
     actual = target.OpenRead(address);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #10
0
 public void GetURLTest()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     string documentFullName = string.Empty; // TODO: Initialize to an appropriate value
     string xwikiAction = string.Empty; // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     actual = target.GetURL(documentFullName, xwikiAction);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #11
0
 public void HeadersTest()
 {
     string serverURL = "http://localhost:8080";
     string username = "******";
     string password = "******";
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password);
     WebHeaderCollection actual = target.Headers;
     Assert.IsNotNull(target);
     Assert.IsNotNull(actual);
 }
コード例 #12
0
 public void GetSpacesTest()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     List<string> expected = null; // TODO: Initialize to an appropriate value
     List<string> actual;
     actual = target.GetSpaces();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #13
0
 public void GetRenderedPageContentTest1()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     string pageFullName = string.Empty; // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     actual = target.GetRenderedPageContent(pageFullName);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #14
0
 public void GetAttachmentContentTest1()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     string URL = string.Empty; // TODO: Initialize to an appropriate value
     byte[] expected = null; // TODO: Initialize to an appropriate value
     byte[] actual;
     actual = target.GetAttachmentContent(URL);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
コード例 #15
0
 public void CookiesTest()
 {
     string serverURL = "http://localhost:8080";
     string username = "******";
     string password = "******";
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password);
     List<String> actual = target.Cookies;
     Assert.IsNotNull(target);
     Assert.IsNotNull(actual);
 }
コード例 #16
0
 public void AddObjectTest()
 {
     string serverURL = string.Empty; // TODO: Initialize to an appropriate value
     string username = string.Empty; // TODO: Initialize to an appropriate value
     string password = string.Empty; // TODO: Initialize to an appropriate value
     XWikiHTTPClient target = new XWikiHTTPClient(serverURL, username, password); // TODO: Initialize to an appropriate value
     string docName = string.Empty; // TODO: Initialize to an appropriate value
     string ClassName = string.Empty; // TODO: Initialize to an appropriate value
     NameValueCollection fieldsValues = null; // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     actual = target.AddObject(docName, ClassName, fieldsValues);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }