Commit d2aa7059a045c67103d148795626db8fdfd9954e

Authored by Conrad Vermeulen
1 parent 47056a2b

WSA-92

"get error when calling move_folder: An existing connection was forcibly closed by the remote host"
Fixed.

Committed By: Conrad Vermeulen
Reviewed By: Megan Watson

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7865 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 52 additions and 0 deletions
ktwebservice/nunit/folder.cs
... ... @@ -49,6 +49,9 @@ namespace MonoTests.KnowledgeTree
49 49  
50 50 }
51 51  
  52 +
  53 +
  54 +
52 55 [Test]
53 56 public void GetFolderByName()
54 57 {
... ... @@ -122,6 +125,55 @@ namespace MonoTests.KnowledgeTree
122 125 response = this._kt.create_folder(this._session, 1, "kt - unit - test");
123 126 Assert.AreEqual(0,response.status_code);
124 127 Assert.AreEqual("kt - unit - test",response.folder_name);
  128 +
  129 + response = this._kt.get_folder_detail_by_name(this._session, "/kt ' unit \" test");
  130 + Assert.AreEqual(0,response.status_code);
  131 + Assert.AreEqual("kt ' unit \" test",response.folder_name);
125 132 }
  133 +
  134 + [Test]
  135 + public void CopyFolder()
  136 + {
  137 +
  138 + kt_folder_detail response = this._kt.create_folder(this._session, 1, "kt_unit_test2");
  139 + Assert.AreEqual(0,response.status_code);
  140 +
  141 + this._folder_id = response.id;
  142 +
  143 + response = this._kt.create_folder(this._session, 1, "subfolder");
  144 + Assert.AreEqual(0,response.status_code);
  145 +
  146 + this._subfolder_id = response.id;
  147 +
  148 +
  149 + response = this._kt.copy_folder(this._session, this._folder_id, this._subfolder_id, "copy reason");
  150 + Assert.AreEqual(0,response.status_code);
  151 + Assert.AreEqual(this._subfolder_id,response.parent_id);
  152 + Assert.AreEqual("kt_unit_test2",response.folder_name);
  153 +
  154 + }
  155 +
  156 + [Test]
  157 + public void MoveFolder()
  158 + {
  159 +
  160 + kt_folder_detail response = this._kt.create_folder(this._session, 1, "kt_unit_test3");
  161 + Assert.AreEqual(0,response.status_code);
  162 +
  163 + this._folder_id = response.id;
  164 +
  165 + response = this._kt.create_folder(this._session, 1, "subfolder3");
  166 + Assert.AreEqual(0,response.status_code);
  167 +
  168 + this._subfolder_id = response.id;
  169 +
  170 + response = this._kt.move_folder(this._session, this._folder_id, this._subfolder_id, "move reason");
  171 + Assert.AreEqual(0,response.status_code);
  172 + Assert.AreEqual(this._folder_id,response.id);
  173 + Assert.AreEqual(this._subfolder_id,response.parent_id);
  174 + Assert.AreEqual("kt_unit_test3",response.folder_name);
  175 + }
  176 +
  177 +
126 178 }
127 179 }
... ...