mifriis / edge-of-kuiper

Textbased space rpg somewhat based on real science
Other
7 stars 3 forks source link

bug fix #49

Closed mifriis closed 2 years ago

github-actions[bot] commented 2 years ago

Test- and Coverage-report - PR #49

Run Summary

Overall Result: ❌ Fail
Pass Rate: 97.87%
Run Duration: 2s 609ms
Date: 2022-09-13 13:45:44 - 2022-09-13 13:45:46
Framework: .NETCoreApp,Version=v6.0
Total Tests: 94

✔️ Passed ❌ Failed ⚠️ Skipped
92 2 0
97.87% 2.13% 0%

Result Sets

kuiper-tests.dll - 97.87%

Full Results
Result Test Duration
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.CalculateAccelerationGsCorrectly 7ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.SetCorrectOrbitRadius 5ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.CalculateMassBasedOnModules < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.DeductFuelBasedOnSpentDVCorrectly < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.CalculateDeltaVelocityCorrectly < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.EmptyTheTankOnFullDeltaVSpent < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.ReturnSpentFuel < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.CalculateAccelerationCorrectly < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.RefuelWithoutOverFilling < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.ReturnItsPositionInSpaceAtAGivenTime 2ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.NotPossibleToForceSpendingMoreFuelThanAvailiable 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipShould.RefuelWithoutFillingTheTank < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.AddBodyAsSatelliteIfItHasAParent 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.CreateAMoon 2ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.CreateBodyWithOriginDegrees < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.DontAddBodyAsSatelliteIfItsAnAsteroid 12ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.ReturnItsInitialPositionInSpace < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.CreateBodyWithVelocity < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.CreateAGasGiant < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.SetCorrectOrbitVelocity < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.CreateAStar < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.CreateADwarfPlanet < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.SetCorrectName < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.CreateAPlanet < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.CelestialBodyShould.SetCorrectOriginDegrees < 1ms
✔️ Passed Kuiper.Tests.Unit.Systems.ConsoleCommandParseShould.ParseAndExecute_WithNullGroupedCommand_ParsesWithNameAsGroup 12ms
✔️ Passed Kuiper.Tests.Unit.Systems.ConsoleCommandParseShould.ParseAndExecute_WithArgs_ExecutesWithArgs < 1ms
✔️ Passed Kuiper.Tests.Unit.Systems.ConsoleCommandParseShould.ParseAndExecute_WithoutArgs_ExecutesWithNullArgs < 1ms
✔️ Passed Kuiper.Tests.Unit.Systems.ConsoleCommandParseShould.Parse_WithoutArgs_ParsesWithNullArgs < 1ms
✔️ Passed Kuiper.Tests.Unit.Systems.ConsoleCommandParseShould.Parse_WithNullGroupedCommand_ParsesWithNameAsGroup < 1ms
✔️ Passed Kuiper.Tests.Unit.Systems.ConsoleCommandParseShould.Parse_WithArgs_ParsesWithArgs < 1ms
✔️ Passed Kuiper.Tests.Unit.Systems.GameTimeServiceShould.ThrowExceptionIfRealStartTimeNeverSet < 1ms
✔️ Passed Kuiper.Tests.Unit.Systems.GameTimeServiceShould.ReturnGameStartDate 2ms
✔️ Passed Kuiper.Tests.Unit.Systems.GameTimeServiceShould.ReturnGamDateInNextWeekWhenStartingRealYesterday 2ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.SetCorrectName 7ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.SetCorrectOrbitRadius < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.CreateStarBodyTypeFromJson < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.SetCorrectOrbitVelocity < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.CreatePlanetBodyTypeFromJson < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.SetCorrectOriginDegrees < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.CreateMoonBodyTypeFromJson < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.NotFailIfJsonFileExist < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.CreateDwarfPlanetBodyTypeFromJson < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.CreateGasGiantBodyTypeFromJson < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.FailIfJsonFileDoesNotExist < 1ms
✔️ Passed Kuiper.Tests.Unit.Repositories.JsonFileSolarSystemRepositoryShould.CreateCorrectAmountOfBodiesFromJson < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.EventServiceShould.ExecuteAllEventsThatHappenedBeforeNow 149ms
✔️ Passed Kuiper.Tests.Unit.Services.CaptainServiceShould.SaveSuccessfully 126ms
✔️ Passed Kuiper.Tests.Unit.Services.EventServiceShould.AddEventToEventList 5ms
✔️ Passed Kuiper.Tests.Unit.Services.EventServiceShould.RemoveEventFromEventList < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ScanForAsteroidsEventShould.ExecuteTheRightServices 7ms
❌ Failed Kuiper.Tests.Unit.Services.CaptainServiceShould.LoadCaptainWhenSavesFound
Error Message:
Assert.Equal() Failure
Expected: Captain { Account = Account { Balance = 100, Transactions = [...] }, LastLoggedIn = 0001-01-01T00:00:00.0000000, Name = "LongLars", Ship = Ship { Acceleration = 2.770083102493075, AccelerationGs = 0.2824698650908389, CurrentLocation = null, deltaV = 3498947.07537546, DryMass = 261, ... }, StartTime = 2022-09-13T13:45:46.4161392+00:00 }
Actual:   Captain { Account = Account { Balance = 0, Transactions = [...] }, LastLoggedIn = 0001-01-01T00:00:00.0000000, Name = "LongLars", Ship = Ship { Acceleration = (throws ArgumentNullException), AccelerationGs = (throws ArgumentNullException), CurrentLocation = null, deltaV = (throws ArgumentNullException), DryMass = (throws ArgumentNullException), ... }, StartTime = 2070-02-03T00:00:00.0000000 }
Stack Trace:
   at Kuiper.Tests.Unit.Services.CaptainServiceShould.LoadCaptainWhenSavesFound() in /home/runner/work/edge-of-kuiper/edge-of-kuiper/kuiper-tests/Services/CaptainServiceShould.cs:line 185
13ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.DoNothingWhenTheDestinationIsFubar 11ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.UpdateShipStatusWhenDestinationValid 8ms
✔️ Passed Kuiper.Tests.Unit.Services.CaptainServiceShould.SetupANewCaptainIfNoSavesFound 17ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.ShowDestinationsWhenCurrentLocationIsAsteroid 3ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.RemovePreviousDestinationFromGameEventsIfAlreadyEnroute 3ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.UpdateShipStatusWhenDestinationReached < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.ReturnMergedListOfPlanetMoonsAndAsteroid 1ms
❌ Failed Kuiper.Tests.Unit.Services.CaptainServiceShould.ReturnCaptainIfAlreadySetup
Error Message:
Moq.MockException : 
Expected invocation on the mock exactly 1 times, but was 0 times: x => x.LookForSaves(It.IsAny())

Performed invocations:

   Mock (x):
   No invocations performed.
Stack Trace:
   at Moq.Mock.Verify(Mock mock, LambdaExpression expression, Times times, String failMessage) in C:\projects\moq4\src\Moq\Mock.cs:line 337
   at Moq.Mock`1.Verify[TResult](Expression`1 expression, Times times) in C:\projects\moq4\src\Moq\Mock`1.cs:line 835
   at Kuiper.Tests.Unit.Services.CaptainServiceShould.ReturnCaptainIfAlreadySetup() in /home/runner/work/edge-of-kuiper/edge-of-kuiper/kuiper-tests/Services/CaptainServiceShould.cs:line 60
9ms
✔️ Passed Kuiper.Tests.Unit.Services.CaptainServiceShould.ThrowIfCaptainIsNotSet < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.UpdateShipStatusWhenDestinationIsAsteroid 5ms
✔️ Passed Kuiper.Tests.Unit.Domain.AsteroidShould.Create < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.CalculatedVToTarget 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.DoNothingWhenTheDestinationIsNotReachable 1ms
✔️ Passed Kuiper.Tests.Unit.Services.AccountShould.WithdrawSucessfully 3ms
✔️ Passed Kuiper.Tests.Unit.Services.AccountShould.TransactionsHaveHumanOutput < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.CalculateTimeToTarget 3ms
✔️ Passed Kuiper.Tests.Unit.Services.AccountShould.KeepTransactionOfAcitvities 2ms
✔️ Passed Kuiper.Tests.Unit.Services.AccountShould.DepositSucessfully < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipServiceShould.HandleNullGameEventsList 4ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipEngineShould.CalculateThrustToWeightRationCorrectly < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.ShipEngineShould.CalculateExhaustVelocityCorretly < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.ReturnBodyBasedOnName 3ms
✔️ Passed Kuiper.Tests.Unit.Services.AccountServiceShould.ReturnTransactionalAcitivitesFromAnAccount 1ms
✔️ Passed Kuiper.Tests.Unit.Services.AccountServiceShould.WithdrawFromAnAccount < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.AccountServiceShould.DepositInAnAccount < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.ReturnCorrectKmDistanceBetweenBodies 3ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.ExceptionThrownIfAttemptToCreateSameNameBody < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.RemoveABodyThatDoesntExistToTheSolarSystemSuccessfully < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.ReturnSattelitesAroundABody 2ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.ReturnCorrectAuDistanceBetweenBodies < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SetCourseEventShould.ExecuteTheRightServices 4ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.CanRemoveABodyWithSatellitesFromTheSolarSystemSuccessfully < 1ms
✔️ Passed Kuiper.Tests.Unit.Domain.NavigationBodyShould.CreateNavigationBodyWithTheRightCoordinate 2ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.RemoveAnAsteroidFromTheSolarSystemSuccessfully 2ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.AddAnAsteroidToTheSolarSystemSuccessfully < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.ReturnCorrectKmDistanceBetweenAMoonAndADifferentBody < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.CanAddABodyWithSatellitesFromTheSolarSystemSuccessfully < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.AddABodyToTheSolarSystemSuccessfully < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.ReturnAllBodiesUnderAStar < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.RemoveABodyToTheSolarSystemSuccessfully < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.ReturnAsteroidBasedOnName < 1ms
✔️ Passed Kuiper.Tests.Unit.Services.SolarSystemServiceShould.ReturnCorrectAuDistanceBetweenABodyAndAsteroidCorrectly 1ms

Run Messages

Informational

[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 6.0.8)
[xUnit.net 00:00:00.65]   Discovering: kuiper-tests
[xUnit.net 00:00:00.71]   Discovered:  kuiper-tests
[xUnit.net 00:00:00.71]   Starting:    kuiper-tests
[xUnit.net 00:00:01.01]       Assert.Equal() Failure
[xUnit.net 00:00:01.01]       Expected: Captain { Account = Account { Balance = 100, Transactions = [...] }, LastLoggedIn = 0001-01-01T00:00:00.0000000, Name = "LongLars", Ship = Ship { Acceleration = 2.770083102493075, AccelerationGs = 0.2824698650908389, CurrentLocation = null, deltaV = 3498947.07537546, DryMass = 261, ... }, StartTime = 2022-09-13T13:45:46.4161392+00:00 }
[xUnit.net 00:00:01.01]       Actual:   Captain { Account = Account { Balance = 0, Transactions = [...] }, LastLoggedIn = 0001-01-01T00:00:00.0000000, Name = "LongLars", Ship = Ship { Acceleration = (throws ArgumentNullException), AccelerationGs = (throws ArgumentNullException), CurrentLocation = null, deltaV = (throws ArgumentNullException), DryMass = (throws ArgumentNullException), ... }, StartTime = 2070-02-03T00:00:00.0000000 }
[xUnit.net 00:00:01.01]       Stack Trace:
[xUnit.net 00:00:01.01]         /home/runner/work/edge-of-kuiper/edge-of-kuiper/kuiper-tests/Services/CaptainServiceShould.cs(185,0): at Kuiper.Tests.Unit.Services.CaptainServiceShould.LoadCaptainWhenSavesFound()
[xUnit.net 00:00:01.03]       Moq.MockException : 
[xUnit.net 00:00:01.03]       Expected invocation on the mock exactly 1 times, but was 0 times: x => x.LookForSaves(It.IsAny())
[xUnit.net 00:00:01.03]       
[xUnit.net 00:00:01.03]       Performed invocations:
[xUnit.net 00:00:01.03]       
[xUnit.net 00:00:01.03]          Mock (x):
[xUnit.net 00:00:01.03]          No invocations performed.
[xUnit.net 00:00:01.03]       
[xUnit.net 00:00:01.03]       Stack Trace:
[xUnit.net 00:00:01.03]         C:\projects\moq4\src\Moq\Mock.cs(337,0): at Moq.Mock.Verify(Mock mock, LambdaExpression expression, Times times, String failMessage)
[xUnit.net 00:00:01.03]         C:\projects\moq4\src\Moq\Mock`1.cs(835,0): at Moq.Mock`1.Verify[TResult](Expression`1 expression, Times times)
[xUnit.net 00:00:01.03]         /home/runner/work/edge-of-kuiper/edge-of-kuiper/kuiper-tests/Services/CaptainServiceShould.cs(60,0): at Kuiper.Tests.Unit.Services.CaptainServiceShould.ReturnCaptainIfAlreadySetup()
[xUnit.net 00:00:01.07]   Finished:    kuiper-tests
Warning

Error

[xUnit.net 00:00:01.01]     Kuiper.Tests.Unit.Services.CaptainServiceShould.LoadCaptainWhenSavesFound [FAIL]
[xUnit.net 00:00:01.03]     Kuiper.Tests.Unit.Services.CaptainServiceShould.ReturnCaptainIfAlreadySetup [FAIL]

Created using Liquid Test Reports

Code Coverage