@@ -76,9 +76,13 @@ public void InstanceTest()
7676 [ Fact ]
7777 public async Task CreateEmployeeTest ( )
7878 {
79- List < Employee > employee =
80- new List < Employee > { new Employee ( ) } ;
81- var response = await instance . CreateEmployeeAsync ( accessToken , xeroTenantId , employee ) ;
79+ List < Employee > employees = new List < Employee > { new Employee ( )
80+ {
81+ FirstName = "Adam" ,
82+ LastName = "Adamson" ,
83+ DateOfBirth = new DateTime ( 2000 , 10 , 10 )
84+ } } ;
85+ var response = await instance . CreateEmployeeAsync ( accessToken , xeroTenantId , employees ) ;
8286 Assert . IsType < Employees > ( response ) ;
8387 }
8488
@@ -111,7 +115,10 @@ public async Task CreatePayItemTest()
111115 [ Fact ]
112116 public async Task CreatePayRunTest ( )
113117 {
114- List < PayRun > payRun = new List < PayRun > { new PayRun ( ) } ;
118+ List < PayRun > payRun = new List < PayRun > { new PayRun ( )
119+ {
120+ PayrollCalendarID = Guid . Parse ( "00000000-0000-0000-0000-000000000000" )
121+ } } ;
115122 var response = await instance . CreatePayRunAsync ( accessToken , xeroTenantId , payRun ) ;
116123 Assert . IsType < PayRuns > ( response ) ;
117124 }
@@ -133,7 +140,10 @@ public async Task CreatePayrollCalendarTest()
133140 [ Fact ]
134141 public async Task CreateSuperfundTest ( )
135142 {
136- List < SuperFund > superFund = new List < SuperFund > { new SuperFund ( ) } ;
143+ List < SuperFund > superFund = new List < SuperFund > { new SuperFund ( )
144+ {
145+ Type = SuperFundType . REGULATED
146+ } } ;
137147 var response = await instance . CreateSuperfundAsync ( accessToken , xeroTenantId , superFund ) ;
138148 Assert . IsType < SuperFunds > ( response ) ;
139149 }
@@ -144,7 +154,14 @@ public async Task CreateSuperfundTest()
144154 [ Fact ]
145155 public async Task CreateTimesheetTest ( )
146156 {
147- List < Timesheet > timesheet = new List < Timesheet > { new Timesheet ( ) } ;
157+ var startDate = new DateTime ( 2020 , 10 , 23 ) ;
158+ var endDate = new DateTime ( 2020 , 10 , 30 ) ;
159+ List < Timesheet > timesheet = new List < Timesheet > { new Timesheet ( )
160+ {
161+ EmployeeID = Guid . Parse ( "00000000-0000-0000-0000-000000000000" ) ,
162+ StartDate = startDate ,
163+ EndDate = endDate ,
164+ } } ;
148165 var response = await instance . CreateTimesheetAsync ( accessToken , xeroTenantId , timesheet ) ;
149166 Assert . IsType < Timesheets > ( response ) ;
150167 }
@@ -353,7 +370,12 @@ public async Task GetTimesheetsTest()
353370 public async Task UpdateEmployeeTest ( )
354371 {
355372 Guid employeeId = AutoFaker . Generate < Guid > ( ) ;
356- List < Employee > employee = new List < Employee > { new Employee ( ) } ;
373+ List < Employee > employee = new List < Employee > { new Employee ( )
374+ {
375+ FirstName = "Adam" ,
376+ LastName = "Adamson" ,
377+ DateOfBirth = new DateTime ( 2000 , 10 , 10 )
378+ } } ;
357379 string idempotencyKey = AutoFaker . Generate < string > ( ) ;
358380 var response = await instance . UpdateEmployeeAsync ( accessToken , xeroTenantId , employeeId , employee , idempotencyKey ) ;
359381 Assert . IsType < Employees > ( response ) ;
@@ -379,7 +401,10 @@ public async Task UpdatePayRunTest()
379401 {
380402 Guid payRunID = AutoFaker . Generate < Guid > ( ) ;
381403 string idempotencyKey = AutoFaker . Generate < string > ( ) ;
382- List < PayRun > payRun = new List < PayRun > { new PayRun ( ) } ;
404+ List < PayRun > payRun = new List < PayRun > { new PayRun ( )
405+ {
406+ PayrollCalendarID = Guid . Parse ( "00000000-0000-0000-0000-000000000000" )
407+ } } ;
383408 var response = await instance . UpdatePayRunAsync ( accessToken , xeroTenantId , payRunID , payRun , idempotencyKey ) ;
384409 Assert . IsType < PayRuns > ( response ) ;
385410 }
@@ -405,7 +430,10 @@ public async Task UpdateSuperfundTest()
405430 {
406431 Guid superFundID = AutoFaker . Generate < Guid > ( ) ;
407432 string idempotencyKey = AutoFaker . Generate < string > ( ) ;
408- List < SuperFund > superFund = new List < SuperFund > { new SuperFund ( ) } ;
433+ List < SuperFund > superFund = new List < SuperFund > { new SuperFund ( )
434+ {
435+ Type = SuperFundType . REGULATED
436+ } } ;
409437 var response = await instance . UpdateSuperfundAsync ( accessToken , xeroTenantId , superFundID , superFund , idempotencyKey ) ;
410438 Assert . IsType < SuperFunds > ( response ) ;
411439 }
@@ -418,7 +446,14 @@ public async Task UpdateTimesheetTest()
418446 {
419447 Guid timesheetID = AutoFaker . Generate < Guid > ( ) ;
420448 string idempotencyKey = AutoFaker . Generate < string > ( ) ;
421- List < Timesheet > timesheet = new List < Timesheet > { new Timesheet ( ) } ;
449+ var startDate = new DateTime ( 2020 , 10 , 23 ) ;
450+ var endDate = new DateTime ( 2020 , 10 , 30 ) ;
451+ List < Timesheet > timesheet = new List < Timesheet > { new Timesheet ( )
452+ {
453+ EmployeeID = Guid . Parse ( "00000000-0000-0000-0000-000000000000" ) ,
454+ StartDate = startDate ,
455+ EndDate = endDate ,
456+ } } ;
422457 var response = await instance . UpdateTimesheetAsync ( accessToken , xeroTenantId , timesheetID , timesheet , idempotencyKey ) ;
423458 Assert . IsType < Timesheets > ( response ) ;
424459 }
0 commit comments