static void ReadWorkTypes() { string CatName = ""; for (int i = 0; i < ar.Count; i++) { if (counts[i] == 1) { CatName = ar[i][0]; } else { WorkTypeClass work = new WorkTypeClass(); work.Article = ar[i][0]; if (ar[i][1] != null) { work.parametrs = ar[i][1].Split(',').ToList(); } work.setPriceFunc(ar[i][2]); work.setCategory(CatName); if (DelegateAssemblyService.isCreatedCorrect(work) && !JSONSerializeService.Contains(work)) { JSONSerializeService.AddToOutput(work); } } } JSONSerializeService.Save(); }
public void isCreatedCorrect_workDelegateNameNotChanged() { WorkTypeClass InpWork = new WorkTypeClass(100); InpWork.Article = "test"; InpWork.category = WorkTypeClass.Category.other; string expected = null; DelegateAssemblyService.isCreatedCorrect(InpWork); Assert.AreEqual(expected, InpWork.delegateName); }