Beispiel #1
0
        public void EmployeeDataProcessing_GenerateListOfProcessedData_ReturnList()
        {
            IEmployeeDataProcessor employeeDataProcessor = new EmployeeDataProcessor();
            var actual   = EmployeeMock.ResultantProcessedData().ToList().OrderBy(x => x.EmployeeId).ToList();
            var expected = employeeDataProcessor.ProcessData(EmployeeMock.GetMockEmployeeUnprocessedData().ToList()).OrderBy(x => x.EmployeeId).ToList();

            CollectionAssert.AreEqual(expected, actual, new EmployeeComparer());
        }
Beispiel #2
0
        public void EmployeeDataProcessing_MergeDataSources_ReturnDataTable()
        {
            IEmployeeDataProcessor employeeDataProcessor = new EmployeeDataProcessor();

            var expected  = employeeDataProcessor.MergeDataSource(EmployeeMock.GetDataTable());
            var resultant = EmployeeMock.Resultant();

            Assert.AreEqual(expected.Rows.Count, resultant.Rows.Count);
        }
Beispiel #3
0
        public void EmployeeExport_CSVExporting_SuccessTest()
        {
            var expected = true;

            try
            {
                IWriteCSV _writeCSV = new CSVHelper();
                var       actual    = _writeCSV.Write(@"D:\Hackathon\Output", EmployeeMock.GetEmployeesMockData());
                Assert.AreEqual(expected, actual);
            }
            catch (Exception)
            {
                throw;
            }
        }