git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_SGD/tags/3.7.0.2_original@1 eb19766c-00d9-a042-a3a0-45cb8ec72764
45 lines
778 B
C#
45 lines
778 B
C#
using NUnit.Framework;
|
|
using System;
|
|
using System.IO;
|
|
|
|
namespace MonoTests.KnowledgeTree
|
|
{
|
|
[TestFixture]
|
|
public class AuthenticationTest
|
|
{
|
|
|
|
private String _session;
|
|
private KnowledgeTreeService _kt;
|
|
|
|
[SetUp]
|
|
public void SetUp()
|
|
{
|
|
this._kt = new KTWebService();
|
|
}
|
|
|
|
[TearDown]
|
|
public void TearDown()
|
|
{
|
|
}
|
|
|
|
[Test]
|
|
public void Login()
|
|
{
|
|
kt_response response = this._kt.login("admin","admin","127.0.0.1");
|
|
|
|
Assert.AreEqual(0,response.status_code);
|
|
Assert.IsFalse(response.message == null);
|
|
Assert.IsFalse(response.message == "");
|
|
|
|
this._session = response.message;
|
|
}
|
|
|
|
[Test]
|
|
public void Logout()
|
|
{
|
|
kt_response response = this._kt.logout(this._session);
|
|
Assert.AreEqual(0,response.status_code);
|
|
}
|
|
}
|
|
}
|