public void NUnit_Relatives_Domain_Add()
 {
     Hre_RelativesServices service = new Hre_RelativesServices();
     string result = string.Empty;
     int countSC = 0;
     for (int i = 1; i <= 10; i++)
     {
         var model = new Hre_Relatives
         {
             ProfileID = 1,
             RelativeName = "RelativesName " + i,
             DependantID = 1,
             IsColleaggue = true
         };
         result = service.Add(model);
         if (result != string.Empty)
         {
             countSC += 1;
             Console.WriteLine("Process Success >>> Create >>> " + model.Id
                 + " | " + model.RelativeName
                 );
         }
     }
     Console.WriteLine("Total success record: " + countSC);
 }
Exemple #2
0
        public void NUnit_Relatives_Domain_Add()
        {
            Hre_RelativesServices service = new Hre_RelativesServices();
            string result  = string.Empty;
            int    countSC = 0;

            for (int i = 1; i <= 10; i++)
            {
                var model = new Hre_Relatives
                {
                    ProfileID    = 1,
                    RelativeName = "RelativesName " + i,
                    DependantID  = 1,
                    IsColleaggue = true
                };
                result = service.Add(model);
                if (result != string.Empty)
                {
                    countSC += 1;
                    Console.WriteLine("Process Success >>> Create >>> " + model.Id
                                      + " | " + model.RelativeName
                                      );
                }
            }
            Console.WriteLine("Total success record: " + countSC);
        }
 public void NUnit_Relatives_Domain_GetById()
 {
     string status = string.Empty;
     Hre_RelativesServices service = new Hre_RelativesServices();
     var model = new Hre_Relatives { Id = 10 };
     var result = service.GetById<Hre_RelativesEntity>(model.Id, ref status) as Hre_RelativesEntity;
     NUnit.Framework.Assert.IsNotNull(result);
     Console.Write("SearchResult: " + result.Id 
         + " | " + result.ProfileID
         + " | " + result.RelativeName 
         );
 }
Exemple #4
0
        public void NUnit_Relatives_Domain_GetById()
        {
            string status = string.Empty;
            Hre_RelativesServices service = new Hre_RelativesServices();
            var model = new Hre_Relatives {
                Id = 10
            };
            var result = service.GetById <Hre_RelativesEntity>(model.Id, ref status) as Hre_RelativesEntity;

            NUnit.Framework.Assert.IsNotNull(result);
            Console.Write("SearchResult: " + result.Id
                          + " | " + result.ProfileID
                          + " | " + result.RelativeName
                          );
        }
Exemple #5
0
        public void NUnit_Relatives_Domain_Delete()
        {
            Hre_RelativesServices service = new Hre_RelativesServices();
            int rs    = 0;
            var model = new Hre_Relatives {
                Id = 3
            };
            string result = service.Delete <Hre_RelativesEntity>(model.Id);

            if (result != string.Empty)
            {
                rs += 1;
                Console.WriteLine("Process Success >>> Delete >>> " + model.Id);
            }
        }
 public void NUnit_Relatives_Domain_Edit()
 {
     Hre_RelativesServices service = new Hre_RelativesServices();
     var model = new Hre_Relatives
     {
         Id =10,
         ProfileID = 1,
         RelativeName = "Relatives Name ",
     };
     string result = service.Edit(model);
     if (result != string.Empty)
     {
         Console.WriteLine("Process Success >>> Update >>> " + model.Id
                 + " | " + model.ProfileID
                 + " | " + model.RelativeName
                 );
     }
 }
Exemple #7
0
        public void NUnit_Relatives_Domain_Edit()
        {
            Hre_RelativesServices service = new Hre_RelativesServices();
            var model = new Hre_Relatives
            {
                Id           = 10,
                ProfileID    = 1,
                RelativeName = "Relatives Name ",
            };
            string result = service.Edit(model);

            if (result != string.Empty)
            {
                Console.WriteLine("Process Success >>> Update >>> " + model.Id
                                  + " | " + model.ProfileID
                                  + " | " + model.RelativeName
                                  );
            }
        }
 public void NUnit_Relatives_Domain_Delete()
 {
     Hre_RelativesServices service = new Hre_RelativesServices();
     int rs = 0;
     var model = new Hre_Relatives { Id = 3 };
     string result = service.Delete<Hre_RelativesEntity>(model.Id);
     if (result != string.Empty)
     {
         rs += 1;
         Console.WriteLine("Process Success >>> Delete >>> " + model.Id);
     }
 }