public void JsonDeserializeModelTest() { string filePath = "CalcAppModel.json"; string content = Utility.ReadFileContent(filePath); AppDescriptor descriptor = JsonUtil.DeserializeObject <AppDescriptor>(content); Assert.AreEqual(descriptor.Children.Count, 1); Assert.AreEqual(TestUtility.Count(descriptor.Children[0].Children), 10); Assert.AreEqual(descriptor.ProcessName, "calculator.exe"); }
public void ShouldGetAppsToBeDeployed() { var appToBeDeployed = _testAnabasisBuild.GetApplicationsToDeploy(); Assert.AreEqual(1, appToBeDeployed.Length); _testApp = appToBeDeployed.First(); Assert.AreEqual("appgroup-anabasis-deployment-test-app", _testApp.AppLongName); }
public static bool Save(AppModel model, StreamWriter stream) { AppDescriptor appDescriptor = new AppDescriptor(model); string serializedContent = JsonUtil.SerializeObject(appDescriptor, true, true); stream.Write(serializedContent); return(true); }
public static bool Save(AppModel model, string filePath) { AppDescriptor appDescriptor = new AppDescriptor(model); string serializedContent = JsonUtil.SerializeObject(appDescriptor, true, true); Utility.WriteFileContent(filePath, serializedContent); model.ModelFile = new AppModelFile(filePath); return(true); }
public void AppDescriptor_ctor_AppModel() { AppModel model = new AppModel(); model.Add(new UIATestObject()); model.Add(new UIATestObject()); model.ProcessName = "TestProcess.exe"; AppDescriptor descriptor = new AppDescriptor(model); Assert.AreEqual("TestProcess.exe", descriptor.ProcessName); Assert.AreEqual(2, descriptor.Children.Count); }
public static AppModel Load(string filePath, ModelLoadLevel level = ModelLoadLevel.ReplayOnly) { if (!File.Exists(filePath)) { throw new FileNotFoundException(string.Format("File {0} does not exist", filePath)); } string content = Utility.ReadFileContent(filePath); AppDescriptor appDescriptor = JsonUtil.DeserializeObject <AppDescriptor>(content, level); AppModel model = appDescriptor.GetObject(); model.ModelFile = new AppModelFile(filePath); return(model); }
public void AppDescriptor_GetObject() { AppDescriptor appDescriptor = new AppDescriptor(); appDescriptor.ProcessName = "TestProcess.exe"; appDescriptor.Children.Add(new ObjectDescriptor() { Type = NodeType.UIAControl }); appDescriptor.Children.Add(new ObjectDescriptor() { Type = NodeType.UIAControl }); AppModel appModel = appDescriptor.GetObject(); Assert.AreEqual("TestProcess.exe", appModel.ProcessName); Assert.AreEqual(2, appModel.AllItems.Count); }
public TriangleApplication(AppDescriptor descriptor) : base(descriptor) { }
public TextureCubeApplication(AppDescriptor descriptor) : base(descriptor) { }
public ClearApplication(AppDescriptor descriptor) : base(descriptor) { }
public CubeApplication(AppDescriptor descriptor) : base(descriptor) { }
public static void Setup(AppDescriptor descriptor) { SetCallbacks(ref descriptor.Callbacks); Kernel.Setup(descriptor.ModuleTypes); }
public NonInterleavedApplication(AppDescriptor descriptor) : base(descriptor) { }
public OffscreenApplication(AppDescriptor descriptor) : base(descriptor) { }
public MultipleRenderTargetsApplication(AppDescriptor descriptor) : base(descriptor) { }
public BufferOffsetsApplication(AppDescriptor descriptor) : base(descriptor) { }
public QuadApplication(AppDescriptor descriptor) : base(descriptor) { }
public InstancingApplication(AppDescriptor descriptor) : base(descriptor) { }
public DynTexApplication(AppDescriptor descriptor) : base(descriptor) { }
public ArrayTexApplication(AppDescriptor descriptor) : base(descriptor) { }