Example #1
0
        public Employee Get(int?employeeId, string username)
        {
            List <Employee> employees = MockDataAccess.GetAllEmployees();

            for (int i = 0; i < employees.Count; i++)
            {
                if (employees[i].UserName == username)
                {
                    return(employees[i]);
                }
            }

            return(null);
        }
Example #2
0
        public void TestMockDb_ShowAllTables()
        {
            List <DistributionCentre> distList = MockDataAccess.GetAllDistibutionCentres();

            Debug.WriteLine("DISTRIBUTION CENTRES : ");
            foreach (DistributionCentre centre in distList)
            {
                Debug.WriteLine(centre);
            }

            List <Employee> employeeList = MockDataAccess.GetAllEmployees();

            Debug.WriteLine("\n\n EMPLOYEES : ");
            foreach (Employee emp in employeeList)
            {
                Debug.WriteLine(emp);
            }

            List <StandardPackageType> typeList = MockDataAccess.GetAllPackageTypes();

            Debug.WriteLine("\n\n STANDARD PACKAGE TYPES : ");
            foreach (StandardPackageType t in typeList)
            {
                Debug.WriteLine(t);
            }

            List <Package> packageList = MockDataAccess.GetAllPackages();

            Debug.WriteLine("\n\n PACKAGES : ");
            foreach (Package p in packageList)
            {
                Debug.WriteLine(p);
            }

            List <PackageTransit> transitList = MockDataAccess.GetAllPackageTransits();

            Debug.WriteLine("\n\n PACKAGE TRANSITS : ");
            foreach (PackageTransit t in transitList)
            {
                Debug.WriteLine(t);
            }

            Assert.IsNotNull(employeeList);
        }
Example #3
0
 public List <Employee> GetAllEmployees()     // (P. 28-05-2015)
 {
     return(MockDataAccess.GetAllEmployees());
 }