+ SynchronizeCachedDatabase.cs: Synchronizes the local cache with the remote file. Applies merging if necessary.

+ Tests (not yet complete)
This commit is contained in:
Philipp Crocoll
2013-08-01 22:20:39 +02:00
parent 3cfb2c17e6
commit c0520c055f
21 changed files with 587 additions and 186 deletions

View File

@@ -0,0 +1,29 @@
using System;
using KeePassLib.Serialization;
using keepass2android.Io;
namespace Kp2aUnitTests
{
class TestCacheSupervisor: ICacheSupervisor
{
public bool CouldntOpenFromRemoteCalled { get; set; }
public bool CouldntSaveToRemoteCalled { get; set; }
public bool NotifyOpenFromLocalDueToConflictCalled { get; set; }
public void CouldntSaveToRemote(IOConnectionInfo ioc, Exception e)
{
CouldntSaveToRemoteCalled = true;
}
public void CouldntOpenFromRemote(IOConnectionInfo ioc, Exception ex)
{
CouldntOpenFromRemoteCalled = true;
}
public void NotifyOpenFromLocalDueToConflict(IOConnectionInfo ioc)
{
NotifyOpenFromLocalDueToConflictCalled = true;
}
}
}