public void LoginReturnsLoginResult() { using var carwingsClient = new CarwingsClient(new FakeHttpClientWrapper(Resources.LoginResponse)); var result = carwingsClient.Login("john.doe", "secret", Region.Europe, "88dSp7wWnV3bvv9Z88zEwg"); Assert.AreEqual("NE", result.CustomerInfo.RegionCode); Assert.AreEqual("<nickname>", result.VehicleInfo.Single().Nickname); Assert.AreEqual("<vin>", result.VehicleInfo.Single().Vin); Assert.AreEqual("<custom-session-id>", result.VehicleInfo.Single().CustomSessionId); }
public void Login(string username, string password, Region region) { var basePrm = CarwingsClient.Initialize().Baseprm; LoginResult = CarwingsClient.Login(username, password, region, basePrm); }