public TestsService(WebTest webTest, XMLTest xMLTest, SimpleLogicTest simpleLogicTest, InjectionTest injectionTest) { _webTest = webTest; _xMLTest = xMLTest; _simpleLogicTest = simpleLogicTest; _injectionTest = injectionTest; }
private void onLoadMap() { foreach (Vector3 list in mapObject.Keys) { Destroy(mapObject[list]); //mapObject.Remove(list); mapIndexObject.Remove(list); } mapObject = null; mapObject = new Dictionary <Vector3, GameObject>(); XMLTest xml = new XMLTest(); //gameObject.SetActive(false); mapIndexObject = xml.LoadXml(); foreach (Vector3 list in mapIndexObject.Keys) { GameObject obj = GameObject.Instantiate(mapItemList[mapIndexObject[list]], list, gameObject.transform.rotation); mapObject[obj.transform.position] = obj; obj.transform.SetParent(map.transform); } creatPanel.SetActive(false); }
private void DataGridTests_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex < 0 || e.ColumnIndex != -1) { return; } string Id = DataGridTests.Rows[e.RowIndex].Cells["Id"].Value?.ToString(); if (string.IsNullOrEmpty(Id)) { return; } if (MessageBox.Show("¿Desea editar este elemento?", "Editar", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes) { Test Test = XMLTest.GetById(Id); if (Test != null) { TxtIdTest.Text = Id; TxtName.Text = Test.Name; TxtUrl.Text = Test.Url; CmbxEnverioments.SelectedValue = Test.Enverioment; CmbxProyects.SelectedValue = Test.ProyectName.ToString(); CmbxVerb.SelectedValue = Test.Method; CheckVersion.Checked = Test.IsVersion; } } BtnEliminar.Visible = !string.IsNullOrEmpty(TxtIdTest.Text); }
public ActionResult <string> Get() { var xmlTest = new XMLTest(); var result = xmlTest.TranslateXML(); return(new JsonResult(result)); }
public CruiseService(InjectionTest injectionTest, SimpleLogicTest simpleLogicTest, XMLTest xMLTest, WebTest webTest) { _injectionTest = injectionTest; _simpleLogicTest = simpleLogicTest; _xMLTest = xMLTest; _webTest = webTest; }
private void onSaveMap() { XMLTest test = new XMLTest(); widthTxt.text = "0"; heightTxt.text = "0"; test.creatMap(int.Parse(widthTxt.text), int.Parse(heightTxt.text), mapObject, mapIndexObject); }
static void Main(string[] args) { // OptimumSpotTests optimumSpotTests = new OptimumSpotTests(); // optimumSpotTests .AutoSpotTest(); // XMLTest.WireAndCoefficientTest(); // XMLTest.OTLxml(); //Console.WriteLine("123"); Console.ReadKey(); }
private void BtnEliminar_Click(object sender, EventArgs e) { if (MessageBox.Show("¿Desea eliminar este elemento?", "Eliminar", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes) { string Id = TxtIdTest.Text; XMLTest.Remove(Id); CleanForm(); } }
private void clonarToolStripMenuItem_Click(object sender, EventArgs e) { if (DataGridTests.SelectedRows.Count > 0) { var Rows = DataGridTests.SelectedRows; for (int i = 0; i < Rows.Count; i++) { XMLTest.Add(Test.GetTest(Rows[i])); } } }
private void BtnSave_Click(object sender, EventArgs e) { var Test = GetFormTest(); if (Test != null) { if (string.IsNullOrEmpty(TxtIdTest.Text)) { XMLTest.Add(Test); } else { XMLTest.Edit(Test); } CleanForm(); } }
public void XML() { var xmlTest = new XMLTest(); var result = xmlTest.TranslateXML(); Assert.IsNotNull(result); Assert.AreEqual("BE20210104DXBDXBCRU", result.CruiseCode); Assert.AreEqual("MSC BELLISSIMA", result.ShipName); Assert.AreEqual(106380, result.CabinValue); Assert.AreEqual(14000, result.PortCharge); Assert.AreEqual(1203800, result.TotalValue); // Assert.AreEqual(2, result.PassengerCruise.Count); // Assert.AreEqual(106380, result.PassengerCruise.Sum(x => x.Cruise.CabinValue)); // Assert.AreEqual(14000, result.PassengerCruise.Sum(x => x.Cruise.PortCharge)); // Assert.AreEqual(120380, result.PassengerCruise.Sum(x => x.Cruise.TotalValue)); // Assert.IsTrue(result.PassengerCruise.Any(x => x.PassengerCode == "-9999"),"No passenger -9999"); // Assert.IsTrue(result.PassengerCruise.Any(x => x.PassengerCode == "-9998"),"No passenger -9998"); Assert.Pass(); }
public void Post([FromBody] string value) { XMLTest logic = new XMLTest(); logic.TranslateXML(); }