mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Changed most services to singletons
Refactor the Database Service (no more enum, ...) Restored the Donate page with Paypal web page Added (but not working) MS App Center integration Corrected tests accordingly WIP AOP to detect database changes
This commit is contained in:
@@ -9,13 +9,11 @@ using Windows.Storage;
|
||||
|
||||
namespace ModernKeePassApp.Test.Mock
|
||||
{
|
||||
public class DatabaseServiceMock : IDatabase
|
||||
public class DatabaseServiceMock : IDatabaseService
|
||||
{
|
||||
private bool _isOpen;
|
||||
private bool _isFileOpen;
|
||||
private bool _isClosed;
|
||||
|
||||
|
||||
|
||||
public PwCompressionAlgorithm CompressionAlgorithm { get; set; }
|
||||
|
||||
public StorageFile DatabaseFile { get; set; }
|
||||
@@ -24,20 +22,13 @@ namespace ModernKeePassApp.Test.Mock
|
||||
|
||||
public KdfParameters KeyDerivation { get; set; }
|
||||
|
||||
public bool IsOpen
|
||||
{
|
||||
get { return _isOpen; }
|
||||
}
|
||||
public bool IsOpen => _isOpen;
|
||||
|
||||
public bool IsFileOpen
|
||||
{
|
||||
get { return _isFileOpen; }
|
||||
}
|
||||
public bool IsFileOpen => DatabaseFile != null;
|
||||
|
||||
public bool IsClosed
|
||||
{
|
||||
get { return _isClosed; }
|
||||
}
|
||||
public bool IsClosed => _isClosed;
|
||||
|
||||
public bool HasChanged { get; set; }
|
||||
|
||||
public string Name => "MockDatabase";
|
||||
|
||||
|
@@ -6,7 +6,7 @@ using Windows.Storage;
|
||||
|
||||
namespace ModernKeePassApp.Test.Mock
|
||||
{
|
||||
class RecentServiceMock : IRecent
|
||||
class RecentServiceMock : IRecentService
|
||||
{
|
||||
public int EntryCount => 0;
|
||||
|
||||
|
@@ -3,7 +3,7 @@ using ModernKeePass.Interfaces;
|
||||
|
||||
namespace ModernKeePassApp.Test.Mock
|
||||
{
|
||||
class ResourceServiceMock : IResource
|
||||
class ResourceServiceMock : IResourceService
|
||||
{
|
||||
public string GetResourceValue(string key)
|
||||
{
|
||||
|
@@ -3,7 +3,7 @@ using ModernKeePass.Interfaces;
|
||||
|
||||
namespace ModernKeePassApp.Test.Mock
|
||||
{
|
||||
public class SettingsServiceMock : ISettings
|
||||
public class SettingsServiceMock : ISettingsService
|
||||
{
|
||||
public T GetSetting<T>(string property)
|
||||
{
|
||||
|
Reference in New Issue
Block a user