mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-21 04:26:29 +02:00
Version 3.0.368
This commit is contained in:
parent
24cdfbb0ca
commit
1a58bf58d3
78 changed files with 3104 additions and 2823 deletions
|
@ -246,56 +246,56 @@ namespace TestShareeLib.Repository.Request
|
|||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocationIsNull()
|
||||
public void TestUpdateLockingStateGeolocationIsNull()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&lock_state=locked&voltage=15.03&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocationIsNullBatteryPercentageIsNAN()
|
||||
public void TestUpdateLockingStateGeolocationIsNullBatteryPercentageIsNAN()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, null /* geolocaion */, double.NaN, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, null /* geolocaion */, double.NaN, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&lock_state=locked&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocation_AccuraycyNull()
|
||||
public void TestUpdateLockingStateGeolocation_AccuraycyNull()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), 12, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), 12, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&gps=21,17&gps_age=0.07&lock_state=locked&voltage=12&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocation_AccuraycyNullBatteryPercentageIsNAN()
|
||||
public void TestUpdateLockingStateGeolocation_AccuraycyNullBatteryPercentageIsNAN()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), double.NaN, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), double.NaN, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&gps=21,17&gps_age=0.07&lock_state=locked&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocation()
|
||||
public void TestUpdateLockingStateGeolocation()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Accuracy = 5.7, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), 98, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Accuracy = 5.7, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), 98, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&gps=21,17&gps_accuracy=5.7&gps_age=0.07&lock_state=locked&voltage=98&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateVersionsInfo()
|
||||
public void TestUpdateLockingStateVersionsInfo()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
WebUtility.UrlDecode(builder.UpateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.VersionInfo.Builder { FirmwareVersion=13, HardwareVersion=12, LockVersion=14}.Build())),
|
||||
WebUtility.UrlDecode(builder.UpdateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.VersionInfo.Builder { FirmwareVersion=13, HardwareVersion=12, LockVersion=14}.Build())),
|
||||
Is.EqualTo("request=booking_update&bike=12&lock_state=locked&voltage=15.03&firmware=HW 12;FW 13;Lock 14&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue