Exemplo n.º 1
0
 public void NUnit_Domain_GetCatCostCentres()
 {
     string status = string.Empty;
     Cat_CostCentreServices service = new Cat_CostCentreServices();
     int count = service.GetAllUseEntity<Cat_CostCentreMultiEntity>(ref status).Count();
     //NUnit.Framework.Assert.AreNotEqual(0, count);
     Console.Write("Total Record: " + count);
 }
Exemplo n.º 2
0
 public void NUnit_Domain_GetByIdCatCostCentres()
 {
     Cat_CostCentreServices service = new Cat_CostCentreServices();
     var costCentre = new Cat_CostCentre { Id = 2 };
     string status = string.Empty;
     var result = service.GetById<Cat_CostCentre>(costCentre.Id, ref status) ;
     NUnit.Framework.Assert.IsNotNull(result);
     Console.Write("SearchResult: " + result.Id + " | " + result.CostCentreName + " | " + result.CostCentreCode + " | " + result.GroupCost);
 }
Exemplo n.º 3
0
        public void NUnit_Domain_GetCatCostCentres()
        {
            string status = string.Empty;
            Cat_CostCentreServices service = new Cat_CostCentreServices();
            int count = service.GetAllUseEntity <Cat_CostCentreMultiEntity>(ref status).Count();

            //NUnit.Framework.Assert.AreNotEqual(0, count);
            Console.Write("Total Record: " + count);
        }
Exemplo n.º 4
0
        public void NUnit_Domain_GetByIdCatCostCentres()
        {
            Cat_CostCentreServices service = new Cat_CostCentreServices();
            var costCentre = new Cat_CostCentre {
                Id = 2
            };
            string status = string.Empty;
            var    result = service.GetById <Cat_CostCentre>(costCentre.Id, ref status);

            NUnit.Framework.Assert.IsNotNull(result);
            Console.Write("SearchResult: " + result.Id + " | " + result.CostCentreName + " | " + result.CostCentreCode + " | " + result.GroupCost);
        }
Exemplo n.º 5
0
        public void NUnit_Domain_DeleteCatCostCentre()
        {
            Cat_CostCentreServices service = new Cat_CostCentreServices();
            int rs = 0;
           
                var costCentre = new Cat_CostCentre { Id =  1};
                if (service.Delete<Cat_CostCentre>(costCentre.Id) == ActionStatus.DeleteSucceed.ToString())
                {
                    rs += 1;
                    Console.WriteLine("Process Success >>> Delete >>> " + 1);
                }
            
            Console.WriteLine("Total success record: " + rs);

            //NUnit.Framework.Assert.IsTrue(result);
        }
Exemplo n.º 6
0
 public void NUnit_Domain_UpdateCatCostCentre()
 {
     Cat_CostCentreServices service = new Cat_CostCentreServices();
     var costCentre = new Cat_CostCentre
     {
         Id = 2,
         CostCentreName = "ABCDomain1234",
         CostCentreCode = "abc1234",
         GroupCost = "NUnit Test1234"
     };
    // NUnit.Framework.Assert.IsTrue(result);
     if (service.Edit<Cat_CostCentre>(costCentre) ==  ActionStatus.EditSucceed.ToString())
     {
         Console.WriteLine("==>>> Result After Update:  " + costCentre.Id + " | " + costCentre.CostCentreName + " | " + costCentre.CostCentreCode + " | " + costCentre.GroupCost);
     }
 }
Exemplo n.º 7
0
        public void NUnit_Domain_UpdateCatCostCentre()
        {
            Cat_CostCentreServices service = new Cat_CostCentreServices();
            var costCentre = new Cat_CostCentre
            {
                Id             = 2,
                CostCentreName = "ABCDomain1234",
                CostCentreCode = "abc1234",
                GroupCost      = "NUnit Test1234"
            };

            // NUnit.Framework.Assert.IsTrue(result);
            if (service.Edit <Cat_CostCentre>(costCentre) == ActionStatus.EditSucceed.ToString())
            {
                Console.WriteLine("==>>> Result After Update:  " + costCentre.Id + " | " + costCentre.CostCentreName + " | " + costCentre.CostCentreCode + " | " + costCentre.GroupCost);
            }
        }
Exemplo n.º 8
0
        public void NUnit_Domain_DeleteCatCostCentre()
        {
            Cat_CostCentreServices service = new Cat_CostCentreServices();
            int rs = 0;

            var costCentre = new Cat_CostCentre {
                Id = 1
            };

            if (service.Delete <Cat_CostCentre>(costCentre.Id) == ActionStatus.DeleteSucceed.ToString())
            {
                rs += 1;
                Console.WriteLine("Process Success >>> Delete >>> " + 1);
            }

            Console.WriteLine("Total success record: " + rs);

            //NUnit.Framework.Assert.IsTrue(result);
        }
Exemplo n.º 9
0
 public void NUnit_Domain_AddCatCostCentre()
 {
     Cat_CostCentreServices service = new Cat_CostCentreServices();
     int rs = 0;
    
     var costCentre = new Cat_CostCentre
     {
         CostCentreName = "NUnit Domain CostCentreName 2" ,
         CostCentreCode = "abc 2",
         GroupCost = "NUnit-GroupCost-2" 
     };
  
     if (service.Add<Cat_CostCentre>(costCentre) == ActionStatus.AddSucceed.ToString())
     {
         rs += 1;
         Console.WriteLine("Process Success >>> Create >>> " + costCentre.Id + " | " + costCentre.CostCentreName + " | " + costCentre.CostCentreCode + " | " + costCentre.GroupCost);
     }
     
     Console.WriteLine("Total success record: " + rs);
 }
Exemplo n.º 10
0
        public void NUnit_Domain_AddCatCostCentre()
        {
            Cat_CostCentreServices service = new Cat_CostCentreServices();
            int rs = 0;

            var costCentre = new Cat_CostCentre
            {
                CostCentreName = "NUnit Domain CostCentreName 2",
                CostCentreCode = "abc 2",
                GroupCost      = "NUnit-GroupCost-2"
            };

            if (service.Add <Cat_CostCentre>(costCentre) == ActionStatus.AddSucceed.ToString())
            {
                rs += 1;
                Console.WriteLine("Process Success >>> Create >>> " + costCentre.Id + " | " + costCentre.CostCentreName + " | " + costCentre.CostCentreCode + " | " + costCentre.GroupCost);
            }

            Console.WriteLine("Total success record: " + rs);
        }