Last active
February 5, 2023 21:56
-
-
Save ArunYogeshwaran/aedfd46a0b69706f4a4f6abb7730d0f9 to your computer and use it in GitHub Desktop.
An example of a clear test for a system which recommends the most appropriate jobs based on machine learning models
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A test with relevant details right in the test itself | |
@Test | |
fun `get ML recommended jobs with new user expect predefined list`() { | |
// Test arrangements and setup | |
val engine = getRecommendationEngine() | |
val jobs = engine.getJobs(new User(UserStatus.FAIRLY_NEW, "testId", "Test User Name")) | |
assertThat(jobs).isEqualTo(expectedJobs) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A test with relevant details abstracted out | |
@Test | |
fun `get ML recommended jobs with new user expect predefined list`() { | |
// Test arrangements and setup | |
val engine = new RecommendationEngine(getEnvDetails(), getLocalInfo(), getSessionProperties()) | |
val jobs = engine.getJobs(getTestUserInfo()) | |
assertThat(jobs).isEqualTo(expectedJobs) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment