2017-11-23 15:26:57 +01:00
|
|
|
|
using System;
|
|
|
|
|
using ModernKeePass.Interfaces;
|
|
|
|
|
using ModernKeePass.ViewModels;
|
|
|
|
|
using ModernKeePassLib;
|
|
|
|
|
using ModernKeePassLib.Cryptography.KeyDerivation;
|
|
|
|
|
using ModernKeePassLib.Keys;
|
|
|
|
|
using Windows.Storage;
|
|
|
|
|
|
|
|
|
|
namespace ModernKeePassApp.Test.Mock
|
|
|
|
|
{
|
2017-12-01 17:59:38 +01:00
|
|
|
|
public class DatabaseServiceMock : IDatabase
|
2017-11-23 15:26:57 +01:00
|
|
|
|
{
|
|
|
|
|
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()
|
|
|
|
|
{
|
2017-11-27 15:26:36 +01:00
|
|
|
|
Status = 0;
|
2017-11-23 15:26:57 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void CreateRecycleBin()
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Open(CompositeKey key, bool createNew)
|
|
|
|
|
{
|
2017-11-27 15:26:36 +01:00
|
|
|
|
Status = 2;
|
2017-11-23 15:26:57 +01:00
|
|
|
|
}
|
|
|
|
|
|
2017-11-23 19:02:49 +01:00
|
|
|
|
public void Save()
|
2017-11-23 15:26:57 +01:00
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-23 19:02:49 +01:00
|
|
|
|
public void Save(StorageFile file)
|
2017-11-23 15:26:57 +01:00
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void UpdateCompositeKey(CompositeKey key)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|