Skip to content

Sync high-scores tests #381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions exercises/practice/high-scores/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ description = "Top 3 scores -> Latest score after personal top scores"

[809c4058-7eb1-4206-b01e-79238b9b71bc]
description = "Top 3 scores -> Scores after personal top scores"

[ddb0efc0-9a86-4f82-bc30-21ae0bdc6418]
description = "Top 3 scores -> Latest score after personal best"

[6a0fd2d1-4cc4-46b9-a5bb-2fb667ca2364]
description = "Top 3 scores -> Scores after personal best"
72 changes: 71 additions & 1 deletion exercises/practice/high-scores/HighScoresTests.vb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Imports System.Collections.Generic
Imports Xunit

Public Class HighScoresTest
<Fact>
Public Sub ListOfScores()
Expand Down Expand Up @@ -112,4 +113,73 @@ Public Class HighScoresTest
40
}, sut.PersonalTopThree())
End Sub
End Class

<Fact(Skip:="Remove this Skip property to run this test")>
Public Sub LatestScoreAfterPersonalTopScores()
Dim sut = New HighScores(New List(Of Integer) From {
70,
50,
20,
30
})
Assert.Equal(new List(Of Integer) From {
70,
50,
30
} , sut.PersonalTopThree())
Assert.Equal(30, sut.Latest())
End Sub

<Fact(Skip:="Remove this Skip property to run this test")>
Public Sub ScoresAfterPersonalTopScores()
Dim sut = New HighScores(New List(Of Integer) From {
30,
50,
20,
70
})
Assert.Equal(New List(Of Integer) From {
70,
50,
30
}, sut.PersonalTopThree())
Assert.Equal(New List(Of Integer) From {
30,
50,
20,
70
}, sut.Scores())
End Sub

<Fact(Skip:="Remove this Skip property to run this test")>
Public Sub LatestScoreAfterPersonalBest()
Dim sut = New HighScores(New List(Of Integer) From {
20,
70,
15,
25,
30
})
Assert.Equal(70, sut.PersonalBest())
Assert.Equal(30, sut.Latest())
End Sub

<Fact(Skip:="Remove this Skip property to run this test")>
Public Sub ScoresAfterPersonalBest()
Dim sut = New HighScores(New List(Of Integer) From {
20,
70,
15,
25,
30
})
Assert.Equal(70, sut.PersonalBest())
Assert.Equal(New List(Of Integer) From {
20,
70,
15,
25,
30
}, sut.Scores())
End Sub
End Class
Loading