Skip to content
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

Fix part of #210: Fix name and test inconsistencies for FractionInputIsEquivalentToRuleClassifierProviderTest #2221

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ class FractionInputIsEquivalentToRuleClassifierProviderTest {
numerator = 2,
denominator = 8
)
private val FRACTION_VALUE_TEST_1_OVER_4 =
InteractionObjectTestBuilder.createFraction(
isNegative = false,
numerator = 1,
denominator = 4
)
private val FRACTION_VALUE_TEST_1_OVER_5 =
InteractionObjectTestBuilder.createFraction(
isNegative = false,
Expand Down Expand Up @@ -71,7 +77,7 @@ class FractionInputIsEquivalentToRuleClassifierProviderTest {
numerator = 1,
denominator = 4
)
private val NON_NEGATIVE_VALUE_TEST_679_2_OVER_3 =
private val NEGATIVE_VALUE_TEST_679_2_OVER_3 =
InteractionObjectTestBuilder.createMixedNumber(
isNegative = true,
wholeNumber = 679,
Expand Down Expand Up @@ -117,7 +123,7 @@ class FractionInputIsEquivalentToRuleClassifierProviderTest {
}

@Test
fun testEquality_fraction2Over4Answer_withFraction2Over4Input_bothValuesEquivalent() {
fun testEquality_fraction2Over8Answer_withFraction2Over8Input_bothValuesEquivalent() {
val inputs = mapOf("f" to FRACTION_VALUE_TEST_2_OVER_8)

val matches =
Expand All @@ -130,7 +136,7 @@ class FractionInputIsEquivalentToRuleClassifierProviderTest {
}

@Test
fun testEquality_fraction2Over4Answer_withFraction1Over5Input_bothValuesNotEquivalent() {
fun testEquality_fraction2Over8Answer_withFraction1Over5Input_bothValuesNotEquivalent() {
val inputs = mapOf("f" to FRACTION_VALUE_TEST_1_OVER_5)

val matches =
Expand All @@ -143,7 +149,20 @@ class FractionInputIsEquivalentToRuleClassifierProviderTest {
}

@Test
fun testEquality_fraction2Over33Answer_withFaction1Over242Input_bothValuesEquivalent() {
fun testEquality_fraction1Over4Answer_withFraction2Over8Input_bothValuesEquivalent() {
val inputs = mapOf("f" to FRACTION_VALUE_TEST_2_OVER_8)

val matches =
inputIsEquivalentToRuleClassifier.matches(
answer = FRACTION_VALUE_TEST_1_OVER_4,
inputs = inputs
)

assertThat(matches).isTrue()
}

@Test
fun testEquality_fraction33Over2Answer_withFraction33Over2Input_bothValuesEquivalent() {
val inputs = mapOf("f" to FRACTION_VALUE_TEST_33_OVER_2)

val matches =
Expand All @@ -156,7 +175,7 @@ class FractionInputIsEquivalentToRuleClassifierProviderTest {
}

@Test
fun testEquality_fraction2Over33Answer_withFaction1Over242Input_bothValuesNotEquivalent() {
fun testEquality_fraction33Over2Answer_withFraction242Over1Input_bothValuesNotEquivalent() {
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
val input = mapOf("f" to FRACTION_VALUE_TEST_242_OVER_1)

val matches =
Expand All @@ -182,7 +201,7 @@ class FractionInputIsEquivalentToRuleClassifierProviderTest {
}

@Test
fun testEquality_mixedNumber55And1Over4Answer_withMixedNumber6And1Over2Input_bothValuesMatch() {
fun testEquality_mixedNum55And1Over4Answer_withMixedNum6And1Over2Input_bothValuesDoNotMatch() {
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
val inputs = mapOf("f" to MIXED_NUMBER_VALUE_TEST_6_1_OVER_2)

val matches =
Expand All @@ -209,7 +228,7 @@ class FractionInputIsEquivalentToRuleClassifierProviderTest {

@Test
fun testEquality_negativeMixedNumberAnswer_withPositiveMixedNumberInput_bothValuesDoNotMatch() {
val inputs = mapOf("f" to NON_NEGATIVE_VALUE_TEST_679_2_OVER_3)
val inputs = mapOf("f" to NEGATIVE_VALUE_TEST_679_2_OVER_3)

val matches =
inputIsEquivalentToRuleClassifier.matches(
Expand Down