mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-20 12:06:29 +02:00
Legacy testing lib added..
This commit is contained in:
parent
0167fc321f
commit
47ed05837e
118 changed files with 17505 additions and 0 deletions
|
@ -0,0 +1,43 @@
|
|||
using Newtonsoft.Json;
|
||||
using NUnit.Framework;
|
||||
|
||||
|
||||
namespace TINK.Repository.Response
|
||||
{
|
||||
|
||||
[TestFixture]
|
||||
public class TestResponseBase
|
||||
{
|
||||
[Test]
|
||||
public void TestDeserialize()
|
||||
{
|
||||
// Deserialize object and verify.
|
||||
var l_oContainer = CopriCallsMemory.DoAuthorize("javaminister@gmail.com", "javaminister", "HwId1000000000000");
|
||||
|
||||
// Check first entry.
|
||||
Assert.AreEqual("authorization", l_oContainer.response);
|
||||
Assert.AreEqual("4da3044c8657a04ba60e2eaa753bc51a", l_oContainer.authcookie);
|
||||
Assert.AreEqual("OK", l_oContainer.response_state);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestToString()
|
||||
{
|
||||
var l_oResponse = JsonConvert.DeserializeObject<ResponseBase>(@"
|
||||
{
|
||||
""response_state"": ""OhMyState"",
|
||||
""response"": ""HabGsagt"",
|
||||
""response_text"": ""die Antwort"",
|
||||
""authcookie"": ""lecker1"",
|
||||
""copri_version"":""123""
|
||||
}");
|
||||
|
||||
Assert.AreEqual(
|
||||
"Response state is \"OhMyState\", " +
|
||||
$"auth cookie is \"lecker1\" and response is \"die Antwort\", " +
|
||||
$"code \"HabGsagt\""+
|
||||
$"response text \"die Antwort\".",
|
||||
l_oResponse.ToString());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue