This PR adds unit tests for all methods in the NoteService.cs class. The tests are written using the xUnit testing framework and the FakeItEasy library for mocking the IFileService dependency. Each method in the NoteService.cs class is covered by a corresponding test method in the NoteServiceTests class.
Summary of Changes
Created a new test class named NoteServiceTests in the note-taker.Tests project.
Added using directives for the xUnit framework, FakeItEasy library, and note_taker.Services namespace.
Created a private readonly field of type IFileService and initialized it with a fake object using the FakeItEasy library.
Created a private readonly field of type NoteService and initialized it in the constructor of the test class using the fake IFileService.
Added test methods for each method in the NoteService.cs class, using the [Fact] attribute to denote each test method.
In each test method, called the corresponding method in the NoteService class and asserted the expected result using the Assert class from the xUnit framework.
Used the methods provided by the FakeItEasy library to verify that all calls to the IFileService were called correctly.
Fixes #54.
To checkout this PR branch, run the following command in your terminal:
git checkout {pull_request.branch_name}
🎉 Latest improvements to Sweep:
Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
We released a demo of our chunker, where you can find the corresponding blog and code.
💡 To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
Description
This PR adds unit tests for all methods in the NoteService.cs class. The tests are written using the xUnit testing framework and the FakeItEasy library for mocking the IFileService dependency. Each method in the NoteService.cs class is covered by a corresponding test method in the NoteServiceTests class.
Summary of Changes
Fixes #54.
To checkout this PR branch, run the following command in your terminal:
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: