mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Created a Settings Service
Created a Recent Service Created a Resources Service Code refactor Updated tests
This commit is contained in:
@@ -8,7 +8,7 @@ using Windows.Storage;
|
||||
|
||||
namespace ModernKeePassApp.Test.Mock
|
||||
{
|
||||
public class DatabaseHelperMock : IDatabase
|
||||
public class DatabaseServiceMock : IDatabase
|
||||
{
|
||||
public PwCompressionAlgorithm CompressionAlgorithm { get; set; }
|
||||
|
28
ModernKeePassApp.Test/Mock/RecentServiceMock.cs
Normal file
28
ModernKeePassApp.Test/Mock/RecentServiceMock.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using ModernKeePass.Interfaces;
|
||||
using Windows.Storage;
|
||||
|
||||
namespace ModernKeePassApp.Test.Mock
|
||||
{
|
||||
class RecentServiceMock : IRecent
|
||||
{
|
||||
public int EntryCount => 0;
|
||||
|
||||
public void Add(IStorageItem file, string metadata)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public ObservableCollection<IRecentItem> GetAllFiles(bool removeIfNonExistant = true)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<IStorageItem> GetFileAsync(string token)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
13
ModernKeePassApp.Test/Mock/ResourceServiceMock.cs
Normal file
13
ModernKeePassApp.Test/Mock/ResourceServiceMock.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using ModernKeePass.Interfaces;
|
||||
|
||||
namespace ModernKeePassApp.Test.Mock
|
||||
{
|
||||
class ResourceServiceMock : IResource
|
||||
{
|
||||
public string GetResourceValue(string key)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
18
ModernKeePassApp.Test/Mock/SettingsServiceMock.cs
Normal file
18
ModernKeePassApp.Test/Mock/SettingsServiceMock.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using ModernKeePass.Interfaces;
|
||||
|
||||
namespace ModernKeePassApp.Test.Mock
|
||||
{
|
||||
public class SettingsServiceMock : ISettings
|
||||
{
|
||||
public T GetSetting<T>(string property)
|
||||
{
|
||||
return default(T);
|
||||
}
|
||||
|
||||
public void PutSetting<T>(string property, T value)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user