Merge branch 'master' into US-166/location-permission

# Conflicts:
#	TINK/TINK/View/Map/MapPage.xaml.cs
#	TINKLib/ViewModel/Map/MapPageViewModel.cs
#	TestFramework/Services/Permissions/PermissionsMock.cs
#	TestTINKLib/TestTINKLib.csproj
This commit is contained in:
Tobias Reski 2021-11-15 10:06:55 +01:00
commit 30c4e4879b
80 changed files with 2737 additions and 481 deletions

View file

@ -1,6 +1,8 @@
using Newtonsoft.Json;
using NUnit.Framework;
using System;
using TestFramework;
using TestShareeLib;
using TINK.Model.State;

View file

@ -10,6 +10,7 @@ using TINK.Services.BluetoothLock;
using TINK.Model.Device;
using TINK.Model.User.Account;
using TestShareeLib.Repository;
using TestFramework.Repository;
namespace TestTINKLib.Fixtures.UseCases.Logout
{
@ -52,7 +53,7 @@ namespace TestTINKLib.Fixtures.UseCases.Logout
Assert.IsTrue(l_oTinkApp.ActiveUser.IsLoggedIn);
// There are 6 bikes available and 2, one reserved and one rented by javaminsiter.
Assert.AreEqual(
8,
10,
l_oTinkApp.GetConnector(true).Query.GetBikesAsync().Result.Response.Count,
"Sum of bikes is 6 occupied plus 2 occupied.");
Assert.AreEqual(2,
@ -66,7 +67,7 @@ namespace TestTINKLib.Fixtures.UseCases.Logout
Assert.IsFalse(l_oTinkApp.ActiveUser.IsLoggedIn);
Assert.AreEqual(
6,
8,
l_oTinkApp.GetConnector(true).Query.GetBikesAsync().Result.Response.Count,
"Sum of bikes is 6 occupied, no one occupied because no user is logged in");
Assert.AreEqual(

View file

@ -2,9 +2,7 @@
using System;
using TINK.Model;
using TINK.Model.Connector;
using TINK.Repository;
using TINK.Model.Services.CopriApi.ServerUris;
using static TINK.Repository.CopriCallsMemory;
using TINK.Services;
using NSubstitute;
using TINK.Model.Services.Geolocation;
@ -12,9 +10,9 @@ using TINK.Services.BluetoothLock;
using TINK.Model.Device;
using TINK.Model.User.Account;
using System.Threading.Tasks;
using TestShareeLib.Repository;
using TestFramework.Repository;
namespace TestTINKLib.Fixtures.UseCases.Login
namespace TestShareeLib.UseCases.Login
{
[TestFixture]
public class TestTinkApp
@ -48,7 +46,7 @@ namespace TestTINKLib.Fixtures.UseCases.Login
Assert.IsFalse(l_oTinkApp.ActiveUser.IsLoggedIn);
Assert.AreEqual(
6,
8,
l_oTinkApp.GetConnector(true).Query.GetBikesAsync().Result.Response.Count,
"Sum of bikes is 6 occupied, no one occupied because no user is logged in");
Assert.AreEqual(
@ -63,7 +61,7 @@ namespace TestTINKLib.Fixtures.UseCases.Login
Assert.IsTrue(l_oTinkApp.ActiveUser.IsLoggedIn);
Assert.AreEqual(
8,
10,
l_oTinkApp.GetConnector(true).Query.GetBikesAsync().Result.Response.Count,
"Sum of bikes is 6 occupied plus 2 occupied.");
Assert.AreEqual(

View file

@ -1,18 +0,0 @@
namespace TestTINKLib
{
/// <summary>
/// Provides helper functionality. Used in TestShareeLib and TestTINKLib.
/// </summary>
public static class TestHelper
{
/// <summary>
/// Eases comparison of xml- files.
/// </summary>
/// <param name="p_strXmlFile"></param>
/// <returns></returns>
public static string PrepareXmlForStringCompare(string p_strXmlFile)
{
return p_strXmlFile.Replace("\r\n", string.Empty).Replace("\t", string.Empty).Replace(" ", string.Empty);
}
}
}

View file

@ -34,6 +34,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TestFramework\TestFramework.csproj" />
<ProjectReference Include="..\TINKLib\TINKLib.csproj" />
</ItemGroup>

View file

@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestShareeLib", "TestSharee
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TINKLib", "..\TINKLib\TINKLib.csproj", "{F3C0288B-7527-42B0-AA43-CC461766D6E1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestFramework", "..\TestFramework\TestFramework.csproj", "{F86692DF-BCB9-4236-8337-04CB65EE4256}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -21,6 +23,10 @@ Global
{F3C0288B-7527-42B0-AA43-CC461766D6E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3C0288B-7527-42B0-AA43-CC461766D6E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3C0288B-7527-42B0-AA43-CC461766D6E1}.Release|Any CPU.Build.0 = Release|Any CPU
{F86692DF-BCB9-4236-8337-04CB65EE4256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F86692DF-BCB9-4236-8337-04CB65EE4256}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F86692DF-BCB9-4236-8337-04CB65EE4256}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F86692DF-BCB9-4236-8337-04CB65EE4256}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE