コード例 #1
0
 public void NUnit_Contract_Domain_Add()
 {
     Cat_OrgStructureServices service = new Cat_OrgStructureServices();
     bool result = true;
     int countSC = 0;
     for (int i = 1; i <= 10; i++)
     {
         var model = new Cat_OrgStructure
         {
             OrgStructureName = "Phong Ban " + i,
             Code = "Add Mã " + i,
             IsRoot = true,
             Description = "Mô Tả " + i,
             TypeID = 1,
             ParentID = 1,
             OrderNumber = i
         };
         result = service.AddCatOrgStructure(model);
         NUnit.Framework.Assert.IsTrue(result);
         if (result == true)
         {
             countSC += 1;
             Console.WriteLine("Process Success >>> Create >>> " + model.Id
                 + " | " + model.OrgStructureName
                 + " | " + model.Code
                 + " | " + model.IsRoot
                 + " | " + model.Description
                 + " | " + model.TypeID
                 + " | " + model.ParentID
                 + " | " + model.OrderNumber
                 );
         }
     }
     Console.WriteLine("Total success record: " + countSC);
 }