waelouf / RanodmVuePractice

0 stars 0 forks source link

Create unit test project for WeatherApp and update WeatherService tests #5

Closed sweep-ai[bot] closed 1 year ago

sweep-ai[bot] commented 1 year ago

Description

This PR adds a new unit test project for the WeatherApp application and updates the tests for the WeatherService class. The changes include:

Summary of Changes

Fixes #1.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/unit-tests

To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.

sweep-ai[bot] commented 1 year ago

GitHub actions yielded the following error.

The command that failed is dotnet build --no-restore WeatherApp.sln. Here are the relevant lines from the logs:

##[error]/home/runner/work/RanodmVuePractice/RanodmVuePractice/WeatherApp/Backend/WeatherApp/WeatherAppWebApi.Tests/WeatherServiceTests.cs(1,7): error CS0246: The type or namespace name 'Moq' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/RanodmVuePractice/RanodmVuePractice/WeatherApp/Backend/WeatherApp/WeatherAppWebApi.Tests/WeatherAppWebApi.Tests.csproj]
##[error]/home/runner/work/RanodmVuePractice/RanodmVuePractice/WeatherApp/Backend/WeatherApp/WeatherAppWebApi.Tests/WeatherServiceTests.cs(11,17): error CS0246: The type or namespace name 'Mock<>' could not be found (are you missing a using directive or an assembly reference?) [/home/runner/work/RanodmVuePractice/RanodmVuePractice/WeatherApp/Backend/WeatherApp/WeatherAppWebApi.Tests/WeatherAppWebApi.Tests.csproj]

This is likely a linting or type-checking issue with the source code. Update the code the changes and avoid modifying the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.