Version 3.0.338

This commit is contained in:
Anja Müller-Meißner 2022-09-06 16:08:19 +02:00 committed by Anja
parent 573fe77e12
commit 0468955d49
751 changed files with 62747 additions and 60672 deletions

View file

@ -3,45 +3,45 @@ using Xamarin.Essentials;
namespace TestFramework.Model.Device
{
public class DeviceMock : ISmartDevice
{
/// <summary>
/// Holds the id of the device.
/// </summary>
private string m_strDeviceId = "522c6ff6886198fd";
public class DeviceMock : ISmartDevice
{
/// <summary>
/// Holds the id of the device.
/// </summary>
private string m_strDeviceId = "522c6ff6886198fd";
public string Manufacturer => throw new System.NotImplementedException();
public string Manufacturer => throw new System.NotImplementedException();
public string Model => throw new System.NotImplementedException();
public string Model => throw new System.NotImplementedException();
public DevicePlatform Platform => DevicePlatform.UWP;
public DevicePlatform Platform => DevicePlatform.UWP;
public string VersionText => throw new System.NotImplementedException();
public string VersionText => throw new System.NotImplementedException();
/// <summary>
/// Constructs a device mock object setting device id to default value.
/// </summary>
public DeviceMock()
{
}
/// <summary>
/// Constructs a device mock object setting device id to default value.
/// </summary>
public DeviceMock()
{
}
/// <summary>
/// Constructs a device mock object.
/// </summary>
/// <param name="p_strDeviceId">Mocked Id</param>
public DeviceMock(string p_strDeviceId)
{
m_strDeviceId = p_strDeviceId;
}
/// <summary>
/// Constructs a device mock object.
/// </summary>
/// <param name="p_strDeviceId">Mocked Id</param>
public DeviceMock(string p_strDeviceId)
{
m_strDeviceId = p_strDeviceId;
}
/// <summary> Gets the device ID.</summary>
/// <returns></returns>
public string Identifier
=> m_strDeviceId;
/// <summary> Gets the device ID.</summary>
/// <returns></returns>
public string Identifier
=> m_strDeviceId;
/// <summary> Close the application. </summary>
public void CloseApplication()
{
}
}
/// <summary> Close the application. </summary>
public void CloseApplication()
{
}
}
}

View file

@ -2,22 +2,22 @@
namespace TestFramework.Model.Device
{
public class SpecialFolderMock : ISpecialFolder
{
/// <summary>
/// Get the folder name of external folder to write to.
/// </summary>
/// <returns></returns>
public string GetExternalFilesDir()
{
return string.Empty;
}
public class SpecialFolderMock : ISpecialFolder
{
/// <summary>
/// Get the folder name of external folder to write to.
/// </summary>
/// <returns></returns>
public string GetExternalFilesDir()
{
return string.Empty;
}
/// <summary> Gets the folder name of the personal data folder dir on internal storage. </summary>
/// <returns>Directory name.</returns>
public string GetInternalPersonalDir()
{
return System.IO.Path.GetTempPath();
}
}
/// <summary> Gets the folder name of the personal data folder dir on internal storage. </summary>
/// <returns>Directory name.</returns>
public string GetInternalPersonalDir()
{
return System.IO.Path.GetTempPath();
}
}
}

View file

@ -3,39 +3,39 @@ using TINK.Model.User.Account;
namespace TestFramework.Model.User.Account
{
public class StoreMock : IStore
{
IAccount m_oAccount;
public class StoreMock : IStore
{
IAccount m_oAccount;
/// <summary>
/// Instantiates
/// - a dummy account to simulate a logged in user before end of last session
/// - an empty account to simulate no user logged in before end of last session
/// </summary>
/// <param name="p_oAccount">If null no user is logged in.</param>
public StoreMock(IAccount p_oAccount = null)
{
m_oAccount = new TINK.Model.User.Account.Account(p_oAccount ?? new EmptyAccount());
}
/// <summary>
/// Instantiates
/// - a dummy account to simulate a logged in user before end of last session
/// - an empty account to simulate no user logged in before end of last session
/// </summary>
/// <param name="p_oAccount">If null no user is logged in.</param>
public StoreMock(IAccount p_oAccount = null)
{
m_oAccount = new TINK.Model.User.Account.Account(p_oAccount ?? new EmptyAccount());
}
public Task<IAccount> Load()
{
return Task.FromResult<IAccount>(new TINK.Model.User.Account.Account(m_oAccount));
}
public Task<IAccount> Load()
{
return Task.FromResult<IAccount>(new TINK.Model.User.Account.Account(m_oAccount));
}
public IAccount Delete(IAccount p_oAccount)
{
// Set member to empty.
m_oAccount = new EmptyAccount();
public IAccount Delete(IAccount p_oAccount)
{
// Set member to empty.
m_oAccount = new EmptyAccount();
// Return empty account.
return new EmptyAccount();
}
// Return empty account.
return new EmptyAccount();
}
public Task Save(IAccount p_oAccount)
{
m_oAccount = new TINK.Model.User.Account.Account(p_oAccount);
return Task.CompletedTask;
}
}
public Task Save(IAccount p_oAccount)
{
m_oAccount = new TINK.Model.User.Account.Account(p_oAccount);
return Task.CompletedTask;
}
}
}