mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-20 12:06:29 +02:00
Version 3.0.338
This commit is contained in:
parent
573fe77e12
commit
0468955d49
751 changed files with 62747 additions and 60672 deletions
|
@ -5,45 +5,45 @@ using TINK.Repository.Response;
|
|||
|
||||
namespace TestTINKLib.Fixtures.ObjectTests.Connector.Exception
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestAuthcookieNotDefinedException
|
||||
{
|
||||
[Test]
|
||||
public void TestConstruct()
|
||||
{
|
||||
Assert.AreEqual(
|
||||
"Can not test.\r\nDie Sitzung ist abgelaufen. Bitte neu anmelden.",
|
||||
(new AuthcookieNotDefinedException(
|
||||
"Can not test.",
|
||||
JsonConvert.DeserializeObject<ResponseBase>(@"{ ""response_state"" : ""Some inner error description""}"))).Message);
|
||||
}
|
||||
[TestFixture]
|
||||
public class TestAuthcookieNotDefinedException
|
||||
{
|
||||
[Test]
|
||||
public void TestConstruct()
|
||||
{
|
||||
Assert.AreEqual(
|
||||
"Can not test.\r\nDie Sitzung ist abgelaufen. Bitte neu anmelden.",
|
||||
(new AuthcookieNotDefinedException(
|
||||
"Can not test.",
|
||||
JsonConvert.DeserializeObject<ResponseBase>(@"{ ""response_state"" : ""Some inner error description""}"))).Message);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestTestIsAuthcookieNotDefined_False()
|
||||
{
|
||||
var response = JsonConvert.DeserializeObject<BikesReservedOccupiedResponse>(@"{ ""response_state"" : ""OK"" }");
|
||||
Assert.That(AuthcookieNotDefinedException.IsAuthcookieNotDefined(response, "Test context", out AuthcookieNotDefinedException exception),
|
||||
Is.EqualTo(false));
|
||||
}
|
||||
[Test]
|
||||
public void TestTestIsAuthcookieNotDefined_False()
|
||||
{
|
||||
var response = JsonConvert.DeserializeObject<BikesReservedOccupiedResponse>(@"{ ""response_state"" : ""OK"" }");
|
||||
Assert.That(AuthcookieNotDefinedException.IsAuthcookieNotDefined(response, "Test context", out AuthcookieNotDefinedException exception),
|
||||
Is.EqualTo(false));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestIsAuthcookieNotDefined_TrueLegacy()
|
||||
{
|
||||
var response = JsonConvert.DeserializeObject<ResponseBase>($"{{ \"response_state\" : \"Failure 1003: authcookie not defined\" }}");
|
||||
Assert.That(AuthcookieNotDefinedException.IsAuthcookieNotDefined(response, "Test context", out AuthcookieNotDefinedException exception),
|
||||
Is.EqualTo(true));
|
||||
[Test]
|
||||
public void TestIsAuthcookieNotDefined_TrueLegacy()
|
||||
{
|
||||
var response = JsonConvert.DeserializeObject<ResponseBase>($"{{ \"response_state\" : \"Failure 1003: authcookie not defined\" }}");
|
||||
Assert.That(AuthcookieNotDefinedException.IsAuthcookieNotDefined(response, "Test context", out AuthcookieNotDefinedException exception),
|
||||
Is.EqualTo(true));
|
||||
|
||||
Assert.That(exception, !Is.Null);
|
||||
}
|
||||
Assert.That(exception, !Is.Null);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestIsAuthcookieNotDefined_False()
|
||||
{
|
||||
var response = JsonConvert.DeserializeObject<ResponseBase>($"{{ \"response_state\" : \"Failure 1001: authcookie not defined\" }}");
|
||||
Assert.That(AuthcookieNotDefinedException.IsAuthcookieNotDefined(response, "Test context", out AuthcookieNotDefinedException exception),
|
||||
Is.EqualTo(true));
|
||||
[Test]
|
||||
public void TestIsAuthcookieNotDefined_False()
|
||||
{
|
||||
var response = JsonConvert.DeserializeObject<ResponseBase>($"{{ \"response_state\" : \"Failure 1001: authcookie not defined\" }}");
|
||||
Assert.That(AuthcookieNotDefinedException.IsAuthcookieNotDefined(response, "Test context", out AuthcookieNotDefinedException exception),
|
||||
Is.EqualTo(true));
|
||||
|
||||
Assert.That(exception, !Is.Null);
|
||||
}
|
||||
}
|
||||
Assert.That(exception, !Is.Null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue