Imports Microsoft.VisualStudio.TestTools.UnitTesting Imports Newtonsoft.Json Imports Connectors.Common.slt.Responses Namespace Connectors.Test.slt Public Class AuthTest ReadOnly oAvailableSystemsResponse As String = "{""Message"":null,""State"":true,""Type"":40,""Value"":[{""Deactivated"":false,""Description"":"""",""Priority"":1,""SystemID"":""764f0168-0005-43ca-bfe7-267b5fe254f4"",""SystemName"":""Prod: e.wa riss Netze GmbH""}]}" ReadOnly oLoginResponse As String = "{""Message"":null,""State"":true,""Type"":40,""Value"":""18487109-f789-4094-9f18-4f0ce85461ca""}" ReadOnly oLogoutResponse As String = "{""Message"": null,""State"":true,""Type"":40}" Sub AvailableSystemsTest() Dim oResp As sltAvailableSystemResponse = JsonConvert.DeserializeObject(Of sltAvailableSystemResponse)(oAvailableSystemsResponse) Assert.AreEqual(True, oResp.State) Assert.AreEqual(40, oResp.Type) Assert.AreEqual(1, oResp.Value.Count) End Sub Sub LoginTest() Dim oResp As sltLoginResponse = JsonConvert.DeserializeObject(Of sltLoginResponse)(oLoginResponse) Assert.AreEqual(Nothing, oResp.Message) Assert.AreEqual(True, oResp.State) Assert.AreEqual(40, oResp.Type) Assert.AreEqual("18487109-f789-4094-9f18-4f0ce85461ca", oResp.Value) End Sub Sub Logout() Dim oResp As sltLogoutResponse = JsonConvert.DeserializeObject(Of sltLogoutResponse)(oLogoutResponse) Assert.AreEqual(Nothing, oResp.Message) Assert.AreEqual(True, oResp.State) Assert.AreEqual(40, oResp.Type) End Sub End Class End Namespace