@@ -76,13 +76,9 @@ public void InstanceTest()
7676 [ Fact ]
7777 public async Task CreateEmployeeTest ( )
7878 {
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 ) ;
79+ List < Employee > employee =
80+ new List < Employee > { new Employee ( ) } ;
81+ var response = await instance . CreateEmployeeAsync ( accessToken , xeroTenantId , employee ) ;
8682 Assert . IsType < Employees > ( response ) ;
8783 }
8884
@@ -115,10 +111,7 @@ public async Task CreatePayItemTest()
115111 [ Fact ]
116112 public async Task CreatePayRunTest ( )
117113 {
118- List < PayRun > payRun = new List < PayRun > { new PayRun ( )
119- {
120- PayrollCalendarID = Guid . Parse ( "00000000-0000-0000-0000-000000000000" )
121- } } ;
114+ List < PayRun > payRun = new List < PayRun > { new PayRun ( ) } ;
122115 var response = await instance . CreatePayRunAsync ( accessToken , xeroTenantId , payRun ) ;
123116 Assert . IsType < PayRuns > ( response ) ;
124117 }
@@ -140,10 +133,7 @@ public async Task CreatePayrollCalendarTest()
140133 [ Fact ]
141134 public async Task CreateSuperfundTest ( )
142135 {
143- List < SuperFund > superFund = new List < SuperFund > { new SuperFund ( )
144- {
145- Type = SuperFundType . REGULATED
146- } } ;
136+ List < SuperFund > superFund = new List < SuperFund > { new SuperFund ( ) } ;
147137 var response = await instance . CreateSuperfundAsync ( accessToken , xeroTenantId , superFund ) ;
148138 Assert . IsType < SuperFunds > ( response ) ;
149139 }
@@ -154,14 +144,7 @@ public async Task CreateSuperfundTest()
154144 [ Fact ]
155145 public async Task CreateTimesheetTest ( )
156146 {
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- } } ;
147+ List < Timesheet > timesheet = new List < Timesheet > { new Timesheet ( ) } ;
165148 var response = await instance . CreateTimesheetAsync ( accessToken , xeroTenantId , timesheet ) ;
166149 Assert . IsType < Timesheets > ( response ) ;
167150 }
@@ -370,12 +353,7 @@ public async Task GetTimesheetsTest()
370353 public async Task UpdateEmployeeTest ( )
371354 {
372355 Guid employeeId = AutoFaker . Generate < Guid > ( ) ;
373- List < Employee > employee = new List < Employee > { new Employee ( )
374- {
375- FirstName = "Adam" ,
376- LastName = "Adamson" ,
377- DateOfBirth = new DateTime ( 2000 , 10 , 10 )
378- } } ;
356+ List < Employee > employee = new List < Employee > { new Employee ( ) } ;
379357 string idempotencyKey = AutoFaker . Generate < string > ( ) ;
380358 var response = await instance . UpdateEmployeeAsync ( accessToken , xeroTenantId , employeeId , employee , idempotencyKey ) ;
381359 Assert . IsType < Employees > ( response ) ;
@@ -401,10 +379,7 @@ public async Task UpdatePayRunTest()
401379 {
402380 Guid payRunID = AutoFaker . Generate < Guid > ( ) ;
403381 string idempotencyKey = AutoFaker . Generate < string > ( ) ;
404- List < PayRun > payRun = new List < PayRun > { new PayRun ( )
405- {
406- PayrollCalendarID = Guid . Parse ( "00000000-0000-0000-0000-000000000000" )
407- } } ;
382+ List < PayRun > payRun = new List < PayRun > { new PayRun ( ) } ;
408383 var response = await instance . UpdatePayRunAsync ( accessToken , xeroTenantId , payRunID , payRun , idempotencyKey ) ;
409384 Assert . IsType < PayRuns > ( response ) ;
410385 }
@@ -430,10 +405,7 @@ public async Task UpdateSuperfundTest()
430405 {
431406 Guid superFundID = AutoFaker . Generate < Guid > ( ) ;
432407 string idempotencyKey = AutoFaker . Generate < string > ( ) ;
433- List < SuperFund > superFund = new List < SuperFund > { new SuperFund ( )
434- {
435- Type = SuperFundType . REGULATED
436- } } ;
408+ List < SuperFund > superFund = new List < SuperFund > { new SuperFund ( ) } ;
437409 var response = await instance . UpdateSuperfundAsync ( accessToken , xeroTenantId , superFundID , superFund , idempotencyKey ) ;
438410 Assert . IsType < SuperFunds > ( response ) ;
439411 }
@@ -446,14 +418,7 @@ public async Task UpdateTimesheetTest()
446418 {
447419 Guid timesheetID = AutoFaker . Generate < Guid > ( ) ;
448420 string idempotencyKey = AutoFaker . Generate < string > ( ) ;
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- } } ;
421+ List < Timesheet > timesheet = new List < Timesheet > { new Timesheet ( ) } ;
457422 var response = await instance . UpdateTimesheetAsync ( accessToken , xeroTenantId , timesheetID , timesheet , idempotencyKey ) ;
458423 Assert . IsType < Timesheets > ( response ) ;
459424 }
0 commit comments