From 2de7790c308bc25530d6977ab7ffa6ef3abc203d Mon Sep 17 00:00:00 2001 From: Philipp Crocoll Date: Fri, 12 Jul 2013 16:39:55 +0200 Subject: [PATCH] Added test for domain user on WebDav server with partial class to contain the credentials (not checked in) --- src/Kp2aUnitTests/TestLoadDb.cs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/Kp2aUnitTests/TestLoadDb.cs b/src/Kp2aUnitTests/TestLoadDb.cs index d7e2402b..119f3116 100644 --- a/src/Kp2aUnitTests/TestLoadDb.cs +++ b/src/Kp2aUnitTests/TestLoadDb.cs @@ -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 :-("); + + } } } \ No newline at end of file