Added test for domain user on WebDav server with partial class to contain the credentials (not checked in)

This commit is contained in:
Philipp Crocoll 2013-07-12 16:39:55 +02:00
parent 1391112148
commit 2de7790c30

View File

@ -9,7 +9,7 @@ using keepass2android;
namespace Kp2aUnitTests
{
[TestClass]
internal class TestLoadDb : TestBase
internal partial class TestLoadDb : TestBase
{
private void RunLoadTest(string filenameWithoutDir, string password, string keyfile)
{
@ -67,6 +67,29 @@ namespace Kp2aUnitTests
{
RunLoadTest("EmptyPassword.kdbx", "", "");
}
[TestMethod]
public void LoadFromRemoteWithDomain()
{
var ioc = RemoteDomainIoc; //note: this property is defined in "TestLoadDbCredentials.cs" which is deliberately excluded from Git because the credentials are not public!
IKp2aApp app = new TestKp2aApp();
app.CreateNewDatabase();
bool loadSuccesful = false;
LoadDb task = new LoadDb(app, ioc, "a", null, new ActionOnFinish((success, message) =>
{
if (!success)
Android.Util.Log.Debug("KP2ATest", "error loading db: " + message);
loadSuccesful = success;
})
);
ProgressTask pt = new ProgressTask(app, Application.Context, task);
Android.Util.Log.Debug("KP2ATest", "Running ProgressTask");
pt.Run();
pt.JoinWorkerThread();
Android.Util.Log.Debug("KP2ATest", "PT.run finished");
Assert.IsTrue(loadSuccesful, "didn't succesfully load database :-(");
}
}
}