Example #1
0
 /// <summary>
 /// Tests to ensure we can pull the data from the clocking devices, based on IP's
 /// (in the config file) and saves it to the DB.
 /// </summary>
 //[TestMethod]
 public void Test_NH_ProcessClockingData()
 {
     using (var ctx = new IntranetNhContext())
     {
         var isHoliday = ctx.IsHolidayToday();
         UoWStaff.ProcessClocking();
         //ctx.SaveChanges();
     }
 }
Example #2
0
        /// <summary>
        /// Tests to ensure we can push data by using the "file download " option
        /// from the clocking devices and pass in the TextFile for processing and saves it to the DB.
        /// </summary>
        //[TestMethod]
        public void Test_NH_ProcessClockingDataFromFilesingle()
        {
            using (var ctx = new IntranetNhContext())
            {
                String lsFileName = @"..\..\Clock Data Files\TIME005.TXT";

                var isHoliday = ctx.IsHolidayToday();
                UoWStaff.ProcessClocking(lsFileName);
                //ctx.SaveChanges();
            }
        }
Example #3
0
        //[TestMethod]
        public void Test_NH_StaffManager()
        {
            var ctx = new IntranetNhContext();

            foreach (var staff in ctx.Staff)
            {
                Debug.WriteLine("********************************************");
                Debug.WriteLine("* Manager - " + staff.StaffManager1.StaffFullName);
                Debug.WriteLine("********************************************");
                break;
            }
        }
Example #4
0
        //[TestMethod]
        public void Test_NH_ReadingStaffClockingData()
        {
            var ctx = new IntranetNhContext();

            foreach (var staff in ctx.Context.Staff.ToList())
            {
                foreach (var staffClockModel in staff.StaffClockData)
                {
                    //
                    Debug.WriteLine("--");
                }
            }
        }
Example #5
0
        //[TestMethod]
        public void Test_NH_StaffDivisionBranch()
        {
            var ctx = new IntranetNhContext();

            foreach (var staff in ctx.Staff)
            {
                Debug.WriteLine(String.Format("Branch: {0} | Division: {1} | Name: {2}",
                                              //staff.StaffDivision.DivisionBranch.BranchName,
                                              //staff.StaffDivision.DivisionName,
                                              staff.StaffFullName));
                break;
            }
        }
Example #6
0
        /// <summary>
        /// Tests to ensure we can push data by using "file download" option from the clocking devices
        /// and pass in a list of TextFiles for processing and saves it to the DB.
        /// </summary>
        //[TestMethod]
        public void Test_NH_ProcessClockingDataFromFileList()
        {
            using (var ctx = new IntranetNhContext())
            {
                IList <String> fileList = new List <String>();
                fileList.Add(@"..\..\Clock Data Files\TIME005.TXT");
                fileList.Add(@"..\..\Clock Data Files\TIME006.TXT");
                fileList.Add(@"..\..\Clock Data Files\TIME009.TXT");

                var isHoliday = ctx.IsHolidayToday();
                UoWStaff.ProcessClocking(fileList);
                //ctx.SaveChanges();
            }
        }
Example #7
0
        /// <summary>
        /// Test that "STaffExtended" computed properties are accessible
        /// </summary>
        //[TestMethod]
        public void Test_NH_StaffFullnameMapping()
        {
            var ctx = new IntranetNhContext();

            foreach (var staff in ctx.Staff)
            {
                Debug.WriteLine("********************************************");

                Debug.WriteLine("* Fullname - " + staff.StaffFullName + " *");
                Debug.WriteLine("* Date of birth - " + staff.StaffDob + "      *");
                Debug.WriteLine("* Birthday - " + staff.StaffBirthday + " *");
                Debug.WriteLine("* Birthday - " + staff.StaffIsOnLeave + " *");
                Debug.WriteLine("********************************************");
            }
        }