1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-10 12:33:28 +00:00

Added UI test project

This commit is contained in:
Alison Fernandes
2022-04-05 00:35:48 +01:00
parent f930028920
commit 88fee155db
20 changed files with 904 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
namespace Bit.UITests.Setup.SimulatorManager
{
internal class Simulator
{
public Simulator(string line)
{
ParseLine(line);
}
public string Line { get; private set; }
public string GUID { get; private set; }
public string Name { get; private set; }
public bool IsValid()
{
return !string.IsNullOrWhiteSpace(GUID) && !(string.IsNullOrWhiteSpace(Name));
}
public override string ToString()
{
return Line;
}
void ParseLine(string line)
{
GUID = string.Empty;
Name = string.Empty;
Line = string.Empty;
if (string.IsNullOrWhiteSpace(line))
{
return;
}
Line = line.Trim();
var idx1 = line.IndexOf(" [");
if (idx1 < 1)
{
return;
}
Name = Line.Substring(0, idx1).Trim();
GUID = Line.Substring(idx1 + 2, 36).Trim();
}
}
}