Exemplo n.º 1
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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 3
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 
         );
 }
Exemplo n.º 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
                          );
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 6
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
                 );
     }
 }
Exemplo n.º 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
                                  );
            }
        }
Exemplo n.º 8
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);
     }
 }