public void TestOfAddition() { AppModel.Initialize(); SettingsModel.Initialize(); var Char = TestHelper.CreateTestChar(); Assert.IsTrue(Char.CTRLAttribut.Charisma.Wert == 0); Assert.IsTrue(Char.CTRLAttribut.Logik.Wert == 0); Assert.IsTrue(Char.CTRLVorteil.Data[0].Wert == 0); Assert.IsTrue(Char.CTRLHandlung.Data[0].Wert == 0); Assert.IsTrue(Char.CTRLHandlung.Data[0].Value.Value == 0); Assert.IsTrue(Char.CTRLHandlung.Data[0].Gegen == 0); Char.CTRLAttribut.Charisma.Wert++; Assert.IsTrue(Char.CTRLAttribut.Charisma.Wert == 1); Assert.IsTrue(Char.CTRLAttribut.Logik.Wert == 0); Assert.IsTrue(Char.CTRLVorteil.Data[0].Wert == 0); Assert.IsTrue(Char.CTRLHandlung.Data[0].Gegen == 0); Assert.IsTrue(Char.CTRLHandlung.Data[0].Wert == 0); Assert.IsTrue(Char.CTRLHandlung.Data[0].Value.Value == 1); Char.CTRLVorteil.Data[0].Wert++; Assert.IsTrue(Char.CTRLAttribut.Charisma.Wert == 1); Assert.IsTrue(Char.CTRLAttribut.Logik.Wert == 0); Assert.IsTrue(Char.CTRLVorteil.Data[0].Wert == 1); Assert.IsTrue(Char.CTRLHandlung.Data[0].Wert == 0); Assert.IsTrue(Char.CTRLHandlung.Data[0].Value.Value == 1); Assert.IsTrue(Char.CTRLHandlung.Data[0].GegenCalced == 1); }
public MainWindow() { Test(); InitializeComponent(); m_appModel = new AppModel(); this.DataContext = m_appModel; ConnectEvents(); m_appModel.Initialize(); }
public static void InitModel() { if (Settings is null) { Settings = SettingsModel.Initialize(); } if (Model is null) { Model = AppModel.Initialize(); } }
public void UIATestObject_FindRecursive() { AppModel.Initialize("UnitTestObjectModel1.json"); UIATestObject parentObject = (UIATestObject)AppModel.Current.GetTestObject("LAP (Running) - Microsoft Visual Studio"); UIATestObject testObject = (UIATestObject)parentObject.FindRecursive(DescriptorKeys.NodeName, "Search"); Assert.IsNotNull(testObject, "Should find the test object in the model"); testObject = (UIATestObject)parentObject.FindRecursive(DescriptorKeys.NodeName, "NotExistObject"); Assert.IsNull(testObject, "Should not the test object with a random name"); }
public void ControlSearcher_GetCondition() { AppModel.Initialize("UnitTestObjectModel1.json"); UIATestObject parentObject = (UIATestObject)AppModel.Current.GetTestObject("LAP (Running) - Microsoft Visual Studio"); //UIATestObject testObject = (UIATestObject)parentObject.FindRecursive(DescriptorKeys.NodeName, "Search"); Assert.IsNotNull(parentObject, "Should find the parent test object in the model"); UIACondition parentCondition = UIACondition.GetCondition(parentObject); UIACondition childCondition = ControlSearcher.GetCondition(parentCondition, ControlType.Edit, "Search"); Assert.IsNotNull(childCondition, "Should not be able to find the child condition"); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> internal App() { TLIB.PlatformHelper.ModelHelper.Platform = new TLIB.Code.Uwp.UwpModelHelper(); TLIB.PlatformHelper.StringHelper.Platform = new TLIB.Code.Uwp.UwpStringHelper(); TAPPLICATION.IO.SharedIO.CurrentIO = new TLIB.Code.Uwp.UwpIO(); TAPPLICATION.Model.SharedSettingsModel.PlatformSettings = new TLIB.Code.Uwp.UwpSettings(); AppModel.Initialize(); SettingsModel.Initialize(); this.InitializeComponent(); _displayRequest = new Windows.System.Display.DisplayRequest(); _displayRequest.RequestActive(); this.Suspending += OnSuspending; this.UnhandledException += App_UnhandledExceptionAsync; UnhandledException += App_UnhandledExceptionAsync; SharedSettingsModel.Instance.FOLDERMODE = false; SharedSettingsModel.Instance.INTERN_SYNC = true; }
public void TestOfAddition_N() { AppModel.Initialize(); SettingsModel.Initialize(); CharHolder Char = new CharHolder(); var H1 = new Handlung() { Bezeichner = "Handlung1" }; Char.Add(H1); Char.Add(new Item() { Bezeichner = "Item" }); H1.Value.Connected.Add(Char.CTRLAttribut.Charisma.Value); H1.Value.Connected.Add(Char.CTRLItem[0].Value); TestNewConnections(Char); }
public void TestLoadAndSave_N() { AppModel.Initialize(); SettingsModel.Initialize(); CharHolder Char = new CharHolder(); var H1 = new Handlung() { Bezeichner = "Handlung1" }; Char.Add(H1); Char.Add(new Item() { Bezeichner = "Item" }); H1.Value.Connected.Add(Char.CTRLAttribut.Charisma.Value); H1.Value.Connected.Add(Char.CTRLItem[0].Value); string Ser = SharedIO.Serialize(Char); TestNewConnections(CharHolderIO.Deserialize(Ser)); }
public void LoadRepository(string path) { AppModel.Initialize(path); }
public static void Init(TestContext context) { AppModel.Initialize("UnitTestObjectModel1.json"); }
public void Initialize(string pathToModel) { AppModel.Initialize(pathToModel); }