Changed VMs references to database singleton

Added some unit tests (WIP)
This commit is contained in:
BONNEVILLE Geoffroy
2017-11-23 15:26:57 +01:00
parent 5120c8177b
commit a8f5897364
12 changed files with 215 additions and 89 deletions

View File

@@ -0,0 +1,66 @@
using System;
using ModernKeePass.Interfaces;
using ModernKeePass.ViewModels;
using ModernKeePassLib;
using ModernKeePassLib.Cryptography.KeyDerivation;
using ModernKeePassLib.Keys;
using Windows.Storage;
namespace ModernKeePassApp.Test.Mock
{
public class DatabaseHelperMock : IDatabase
{
public PwCompressionAlgorithm CompressionAlgorithm { get; set; }
public StorageFile DatabaseFile { get; set; }
public PwUuid DataCipher { get; set; }
public KdfParameters KeyDerivation { get; set; }
public string Name => "MockDatabase";
public GroupVm RecycleBin { get; set; }
public bool RecycleBinEnabled { get; set; }
public GroupVm RootGroup { get; set; }
public int Status { get; set; }
public void AddDeletedItem(PwUuid id)
{
throw new NotImplementedException();
}
public void Close()
{
throw new NotImplementedException();
}
public void CreateRecycleBin()
{
throw new NotImplementedException();
}
public void Open(CompositeKey key, bool createNew)
{
throw new NotImplementedException();
}
public bool Save()
{
throw new NotImplementedException();
}
public bool Save(StorageFile file)
{
throw new NotImplementedException();
}
public void UpdateCompositeKey(CompositeKey key)
{
throw new NotImplementedException();
}
}
}