mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-16 14:35:03 -05:00
bcbc225652
- AppTasks are now returned by ActivityResult through all AppTask-Related activities (includes ForwardResult) - AppTasks are now passed correctly even when using search (this fixes a problem that AppTasks like SearchUrl were not passed to EntryActivity so the App didn't return to the browser automatically) - AppTasks are deleted by ActivityResult or by checking for LaunchedFromHistory Added option to leave app with db unlocked (this is even the default now!) Added missing EntryActivity files
34 lines
782 B
C#
34 lines
782 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using Android.App;
|
|
using Android.Content;
|
|
using Android.OS;
|
|
using Java.IO;
|
|
using KeePassLib;
|
|
using KeePassLib.Interfaces;
|
|
using KeePassLib.Keys;
|
|
using KeePassLib.Serialization;
|
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
using keepass2android;
|
|
|
|
namespace Kp2aUnitTests
|
|
{
|
|
[TestClass]
|
|
internal class TestIntentsAndBundles
|
|
{
|
|
[TestMethod]
|
|
public void StringArray()
|
|
{
|
|
string[] dataIn = new string[] { "a","bcd"};
|
|
Intent i= new Intent();
|
|
i.PutExtra("key", dataIn);
|
|
|
|
Bundle extras = i.Extras;
|
|
var dataOut = extras.GetStringArray("key");
|
|
Assert.AreEqual(dataIn.Length, dataOut.Length);
|
|
Assert.AreEqual(dataIn[0], dataOut[0]);
|
|
Assert.AreEqual(dataIn[1], dataOut[1]);
|
|
}
|
|
}
|
|
} |