You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Instructions/Labs/LAB_AK_04_develop_unit_tests_xunit.md
+10-5Lines changed: 10 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -321,15 +321,15 @@ Use the following steps to complete this section of the exercise:
321
321
322
322
Notice the following updates in the Chat view and code editor:
323
323
324
-
- The Chat view displays a message indicating that it wants to run a commandin the terminal:
324
+
- The agent displays status messages as it completes the requested tasks. The first task will be to create the folder structure in the UnitTests project. The agent may create the required folders, or it may pause to ask for confirmation before proceeding.
325
325
326
326

327
327
328
328
- The UnitTests.csproj file is open in the code editor with the following changes:
329
329
330
330

331
331
332
-
1. In the Chat view, to run the commandin the terminal, select**Continue**.
332
+
1. If the agent asks fr permission to run the make directorycommandin the terminal, select**Continue**.
333
333
334
334
When you select**Continue**, GitHub Copilot completes the following actions:
335
335
@@ -338,7 +338,12 @@ Use the following steps to complete this section of the exercise:
338
338
339
339
1. Take a moment to review the updates.
340
340
341
-
1. In the Chat view, to accept all changes, select**Keep**, and thenselect**Done**.
341
+
You should see the following updates in the editor:
342
+
343
+
- The `UnitTests` project now includes a reference to `Library.Infrastructure.csproj`.
344
+
- The `GetLoan.cs` file is created in the `Infrastructure\JsonLoanRepository` folder.
345
+
346
+
1. In the Chat view, to accept all changes, select**Keep**.
342
347
343
348
1. In the SOLUTION EXPLORER view, expand the `Infrastructure\JsonLoanRepository` folder structure.
344
349
@@ -454,7 +459,7 @@ Use the following steps to complete this section of the exercise:
454
459
455
460
```plaintext
456
461
457
-
@workspace Create fields and a class constructor forthe `GetLoan.cs` file. The class will be used to create unit tests for the GetLoan methodin the `JsonLoanRepository.cs` file. Create the following private readonly fields: `_mockLoanRepository`, `_jsonLoanRepository`, `_configuration`, and `_jsonData`. Instantiate the fields in the `GetLoanTest` constructor. Use `ConfigurationBuilder` to create a `_configuration` object that can be used to instantiate the JsonData object.
462
+
#codebase Create fields and a class constructor for the `GetLoan.cs` file. The class will be used to create unit tests for the GetLoan method in the `JsonLoanRepository.cs` file. Create the following private readonly fields: `_mockLoanRepository`, `_jsonLoanRepository`, `_configuration`, and `_jsonData`. Instantiate the fields in the `GetLoanTest` constructor. Use `ConfigurationBuilder` to create a `_configuration` object that can be used to instantiate the JsonData object.
458
463
459
464
```
460
465
@@ -501,7 +506,7 @@ Use the following steps to complete this section of the exercise:
501
506
502
507
> **NOTE**: Sample code in the following step shows updates that correct the following issues:
503
508
504
-
- If there's a conflict between the `UnitTests.Infrastructure.JsonLoanRepository` namespace and the `JsonLoanRepository`type specified in the code, you should update the namespace in GetLoans.cs to eliminate the conflict. The pattern used in the `ReturnLoan.cs` and `RenewMembership.cs` files.
509
+
- If there's a conflict between the `UnitTests.Infrastructure.JsonLoanRepository` namespace and the `JsonLoanRepository`type specified in the code, you should update the namespace in GetLoans.cs to eliminate the conflict. Follow the pattern used in the `ReturnLoan.cs` and `RenewMembership.cs` files.
505
510
506
511
- If `ILoanRepository` isn't recognized in your code, you may need to add a `using` directive for `Library.ApplicationCore` to the top of the file.
0 commit comments