Skip to content

Commit

Permalink
fix: unit test unix time
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoBaSs84 committed Jun 29, 2024
1 parent df0e377 commit 88289c7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void GetAchievementShouldReturnFalseWhenAchievementNotUnlocked()
[TestCategory("Methods")]
public void GetAchievementShouldReturnValuesWhenSteamWorksProviderReturnedValues()
{
uint unlockTime = 946681200;
uint unlockTime = 0;
bool achieved = true;
SteamApiService service = CreateMockedService();
_steamWorksProviderMock.Setup(x => x.Init()).Returns(true);
Expand All @@ -58,7 +58,7 @@ public void GetAchievementShouldReturnValuesWhenSteamWorksProviderReturnedValues
(bool Achieved, DateTime? UnlockTime) result = service.GetAchievement(AchievementName);

Assert.IsTrue(result.Achieved);
Assert.AreEqual(new DateTime(2000, 1, 1), result.UnlockTime);
Assert.AreEqual(DateTimeOffset.FromUnixTimeSeconds(unlockTime).LocalDateTime, result.UnlockTime);
Assert.AreEqual(0, _loggerServiceMock.Invocations.Count);
Assert.AreEqual(0, _notificationServiceMock.Invocations.Count);
Assert.AreEqual(3, _steamWorksProviderMock.Invocations.Count);
Expand Down

0 comments on commit 88289c7

Please sign in to comment.