From 650af0554b902837f8e146d690aca24e4f60ec29 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 31 Dec 2018 14:15:49 +0200 Subject: Removed Default configuration from machine version. Implemented custom ToJson for observables. Implemented Apply & Create prototype machine for machine version. --- .../Utilities/Tango.UITests/MainWindow.xaml.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Software/Visual_Studio/Utilities') diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs index 0ff703178..673136df9 100644 --- a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs +++ b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml.cs @@ -15,7 +15,9 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using Tango.BL; +using Tango.BL.Builders; using Tango.BL.Catalogs; +using Tango.BL.Entities; using Tango.Core; using Tango.Core.Commands; using Tango.DragAndDrop; @@ -30,9 +32,25 @@ namespace Tango.UITests { public MainWindow() { + + Start(); InitializeComponent(); } + private async void Start() + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var machine = new MachineBuilder(db).Set(x => x.SerialNumber == "1111").WithConfiguration().WithOrganization().WithJobs().WithSpools().WithCats().Build(); + MachineVersion version = db.MachineVersions.First(); + await version.ApplyPrototypeMachine(machine, db); + + Machine m = await version.CreatePrototypeMachine(db); + } + } + + + public String CurrentPath { get { return (String)GetValue(CurrentPathProperty); } -- cgit v1.3.1