+ SynchronizeCachedDatabase.cs: Synchronizes the local cache with the remote file. Applies merging if necessary.
+ Tests (not yet complete)
This commit is contained in:
29
src/Kp2aUnitTests/TestCacheSupervisor.cs
Normal file
29
src/Kp2aUnitTests/TestCacheSupervisor.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user