Skip to content

Commit

Permalink
Lint fixes and a few more dep additions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rd4dev committed Jan 6, 2025
1 parent 2ddadb5 commit de2e8e3
Show file tree
Hide file tree
Showing 24 changed files with 11 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ oppia_android_test(
test_manifest = "//app:test_manifest",
deps = [
"//:dagger",
"//testing",
"//app/src/main/java/org/oppia/android/app/application/alpha:alpha_build_flavor_module",
"//model/src/main/proto:version_java_proto_lite",
"//third_party:androidx_test_ext_junit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ oppia_android_test(
test_manifest = "//app:test_manifest",
deps = [
"//:dagger",
"//testing",
"//app/src/main/java/org/oppia/android/app/application/beta:beta_application",
"//model/src/main/proto:version_java_proto_lite",
"//third_party:androidx_test_ext_junit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ oppia_android_test(
test_manifest = "//app:test_manifest",
deps = [
"//:dagger",
"//testing",
"//app/src/main/java/org/oppia/android/app/application/dev:developer_application",
"//model/src/main/proto:version_java_proto_lite",
"//third_party:androidx_test_ext_junit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ oppia_android_test(
test_manifest = "//app:test_manifest",
deps = [
"//:dagger",
"//testing",
"//app/src/main/java/org/oppia/android/app/application/ga:general_availability_application",
"//model/src/main/proto:version_java_proto_lite",
"//third_party:androidx_test_ext_junit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ oppia_android_test(
test_manifest = "//app:test_manifest",
deps = [
"//:dagger",
"//testing",
"//app/src/main/java/org/oppia/android/app/application/testing:testing_build_flavor_module",
"//model/src/main/proto:version_java_proto_lite",
"//third_party:androidx_test_ext_junit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ import org.mockito.Mockito.verifyNoMoreInteractions
import org.mockito.junit.MockitoJUnit
import org.mockito.junit.MockitoRule
import org.oppia.android.app.devoptions.RouteToMathExpressionParserTestListener
import org.oppia.android.testing.OppiaTestRule

/** Tests for [DeveloperOptionsTestParsersViewModel]. */
// FunctionName: test names are conventionally named with underscores.
@Suppress("FunctionName")
class DeveloperOptionsTestParsersViewModelTest {
@get:Rule
val oppiaTestRule = OppiaTestRule()

@Rule
@JvmField
val mockitoRule: MockitoRule = MockitoJUnit.rule()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ import dagger.Component
import dagger.Module
import dagger.Provides
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.InteractionObject
import org.oppia.android.app.model.SchemaObject
import org.oppia.android.app.model.SchemaObjectList
import org.oppia.android.domain.classify.ClassificationContext
import org.oppia.android.domain.classify.RuleClassifier
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down Expand Up @@ -48,8 +46,6 @@ import org.oppia.android.domain.classify.rules.algebraicexpressioninput.DaggerAl
@LooperMode(LooperMode.Mode.PAUSED)
@Config(manifest = Config.NONE)
class AlgebraicExpressionInputMatchesExactlyWithRuleClassifierProviderTest {
@get:Rule
val oppiaTestRule = OppiaTestRule()

@Inject
internal lateinit var provider: AlgebraicExpressionInputMatchesExactlyWithRuleClassifierProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ import dagger.Component
import dagger.Module
import dagger.Provides
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.InteractionObject
import org.oppia.android.app.model.SchemaObject
import org.oppia.android.app.model.SchemaObjectList
import org.oppia.android.domain.classify.ClassificationContext
import org.oppia.android.domain.classify.RuleClassifier
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down Expand Up @@ -49,8 +47,6 @@ import org.oppia.android.domain.classify.rules.algebraicexpressioninput.DaggerAl
@LooperMode(LooperMode.Mode.PAUSED)
@Config(manifest = Config.NONE)
class AlgebraicExpressionInputMatchesUpToTrivialManipulationsRuleClassifierProviderTest {
@get:Rule
val oppiaTestRule = OppiaTestRule()

@Inject internal lateinit var provider: RuleClassifierProvider

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ oppia_android_test(
"//:dagger",
"//domain",
"//domain/src/main/java/org/oppia/android/domain/classify/rules/algebraicexpressioninput:algebraic_expression_input_rule_module",
"//testing",
"//testing/src/main/java/org/oppia/android/testing/robolectric:test_module",
"//testing/src/main/java/org/oppia/android/testing/threading:test_module",
"//testing/src/main/java/org/oppia/android/testing/time:test_module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ oppia_android_test(
"//:dagger",
"//domain",
"//domain/src/main/java/org/oppia/android/domain/classify/rules/mathequationinput:math_equation_input_rule_module",
"//testing",
"//testing/src/main/java/org/oppia/android/testing/robolectric:test_module",
"//testing/src/main/java/org/oppia/android/testing/threading:test_module",
"//testing/src/main/java/org/oppia/android/testing/time:test_module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ import dagger.Component
import dagger.Module
import dagger.Provides
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.InteractionObject
import org.oppia.android.app.model.SchemaObject
import org.oppia.android.app.model.SchemaObjectList
import org.oppia.android.domain.classify.ClassificationContext
import org.oppia.android.domain.classify.RuleClassifier
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down Expand Up @@ -47,8 +45,6 @@ import javax.inject.Singleton
@LooperMode(LooperMode.Mode.PAUSED)
@Config(manifest = Config.NONE)
class MathEquationInputIsEquivalentToRuleClassifierProviderTest {
@get:Rule
val oppiaTestRule = OppiaTestRule()

@Inject
internal lateinit var provider: MathEquationInputIsEquivalentToRuleClassifierProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ import dagger.Component
import dagger.Module
import dagger.Provides
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.InteractionObject
import org.oppia.android.app.model.SchemaObject
import org.oppia.android.app.model.SchemaObjectList
import org.oppia.android.domain.classify.ClassificationContext
import org.oppia.android.domain.classify.RuleClassifier
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down Expand Up @@ -47,8 +45,6 @@ import javax.inject.Singleton
@LooperMode(LooperMode.Mode.PAUSED)
@Config(manifest = Config.NONE)
class MathEquationInputMatchesExactlyWithRuleClassifierProviderTest {
@get:Rule
val oppiaTestRule = OppiaTestRule()

@Inject
internal lateinit var provider: MathEquationInputMatchesExactlyWithRuleClassifierProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ import dagger.Component
import dagger.Module
import dagger.Provides
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.InteractionObject
import org.oppia.android.app.model.SchemaObject
import org.oppia.android.app.model.SchemaObjectList
import org.oppia.android.domain.classify.ClassificationContext
import org.oppia.android.domain.classify.RuleClassifier
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down Expand Up @@ -49,8 +47,6 @@ import org.oppia.android.domain.classify.rules.mathequationinput.MathEquationInp
@LooperMode(LooperMode.Mode.PAUSED)
@Config(manifest = Config.NONE)
class MathEquationInputMatchesUpToTrivialManipulationsRuleClassifierProviderTest {
@get:Rule
val oppiaTestRule = OppiaTestRule()

@Inject internal lateinit var provider: RuleClassifierProvider

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ oppia_android_test(
test_manifest = "//domain:test_manifest",
deps = [
"//:dagger",
"//testing",
"//config/src/java/org/oppia/android/config:all_languages_config",
"//domain/src/main/java/org/oppia/android/domain/locale:content_locale_impl",
"//model/src/main/proto:languages_java_proto_lite",
Expand All @@ -32,6 +33,7 @@ oppia_android_test(
test_manifest = "//domain:test_manifest",
deps = [
"//:dagger",
"//testing",
"//config/src/java/org/oppia/android/config:all_languages_config",
"//domain/src/main/java/org/oppia/android/domain/locale:language_config_retriever",
"//testing/src/main/java/org/oppia/android/testing/robolectric:test_module",
Expand All @@ -57,6 +59,7 @@ oppia_android_test(
test_manifest = "//domain:test_manifest",
deps = [
"//:dagger",
"//testing",
"//config/src/java/org/oppia/android/config:production_languages_config",
"//domain/src/main/java/org/oppia/android/domain/locale:language_config_retriever",
"//testing/src/main/java/org/oppia/android/testing/robolectric:test_module",
Expand All @@ -82,6 +85,7 @@ oppia_android_test(
test_manifest = "//domain:test_manifest",
deps = [
"//:dagger",
"//testing",
"//config/src/java/org/oppia/android/config:all_languages_config",
"//domain/src/main/java/org/oppia/android/domain/locale:language_config_retriever",
"//testing/src/main/java/org/oppia/android/testing/robolectric:test_module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import dagger.Component
import dagger.Module
import dagger.Provides
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.AppStartupState.BuildFlavorNoticeMode.FLAVOR_NOTICE_MODE_UNSPECIFIED
Expand Down Expand Up @@ -44,7 +43,6 @@ import org.oppia.android.domain.platformparameter.PlatformParameterController
import org.oppia.android.domain.platformparameter.PlatformParameterModule
import org.oppia.android.domain.platformparameter.PlatformParameterSingletonModule
import org.oppia.android.testing.FakeAnalyticsEventLogger
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.TestLogReportingModule
import org.oppia.android.testing.data.DataProviderTestMonitor
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
Expand Down Expand Up @@ -87,9 +85,6 @@ import javax.inject.Singleton
@SelectRunnerPlatform(ParameterizedRobolectricTestRunner::class)
@Config(application = AppStartupStateControllerTest.TestApplication::class)
class AppStartupStateControllerTest {
@get:Rule
val oppiaTestRule = OppiaTestRule()

@Inject lateinit var context: Context
@Inject lateinit var appStartupStateController: AppStartupStateController
@Inject lateinit var platformParameterController: PlatformParameterController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import dagger.BindsInstance
import dagger.Component
import dagger.Module
import dagger.Provides
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.AppStartupState.StartupMode
Expand All @@ -29,7 +28,6 @@ import org.oppia.android.domain.oppialogger.analytics.ApplicationLifecycleModule
import org.oppia.android.domain.platformparameter.PlatformParameterController
import org.oppia.android.domain.platformparameter.PlatformParameterModule
import org.oppia.android.domain.platformparameter.PlatformParameterSingletonModule
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.TestLogReportingModule
import org.oppia.android.testing.data.DataProviderTestMonitor
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
Expand Down Expand Up @@ -69,9 +67,6 @@ import javax.inject.Singleton
@SelectRunnerPlatform(ParameterizedRobolectricTestRunner::class)
@Config(application = DeprecationControllerTest.TestApplication::class)
class DeprecationControllerTest {
@get:Rule
val oppiaTestRule = OppiaTestRule()

@Inject lateinit var context: Context
@Inject lateinit var deprecationController: DeprecationController
@Inject lateinit var testCoroutineDispatchers: TestCoroutineDispatchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import dagger.Module
import dagger.Provides
import kotlinx.coroutines.CoroutineDispatcher
import org.junit.Before
import org.junit.Rule
import org.junit.runner.RunWith
import org.oppia.android.data.persistence.PersistentCacheStore
import org.oppia.android.domain.platformparameter.PlatformParameterModule
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.TestLogReportingModule
import org.oppia.android.testing.data.DataProviderTestMonitor
import org.oppia.android.testing.networking.NetworkConnectionTestUtil
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package org.oppia.android.util.math

import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.ComparableOperation
import org.oppia.android.app.model.ComparableOperation.CommutativeAccumulation.AccumulationType.PRODUCT
import org.oppia.android.app.model.ComparableOperation.CommutativeAccumulation.AccumulationType.SUMMATION
import org.oppia.android.app.model.MathExpression
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ package org.oppia.android.util.math
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth.assertThat
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.Fraction
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.assertThrows
import org.robolectric.annotation.Config
import org.robolectric.annotation.LooperMode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package org.oppia.android.util.math

import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.MathEquation
import org.oppia.android.app.model.MathExpression
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.oppia.android.util.math

import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.MathBinaryOperation.Operator.ADD
Expand All @@ -11,7 +10,6 @@ import org.oppia.android.app.model.MathBinaryOperation.Operator.MULTIPLY
import org.oppia.android.app.model.MathBinaryOperation.Operator.SUBTRACT
import org.oppia.android.app.model.MathEquation
import org.oppia.android.app.model.MathExpression
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package org.oppia.android.util.math

import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package org.oppia.android.util.math

import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.Fraction
import org.oppia.android.app.model.Polynomial
import org.oppia.android.app.model.Polynomial.Term
import org.oppia.android.app.model.Polynomial.Term.Variable
import org.oppia.android.app.model.Real
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Parameter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package org.oppia.android.util.math

import com.google.common.truth.Truth.assertThat
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.oppia.android.app.model.Fraction
import org.oppia.android.app.model.Real
import org.oppia.android.testing.OppiaTestRule
import org.oppia.android.testing.assertThrows
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner
import org.oppia.android.testing.junit.OppiaParameterizedTestRunner.Iteration
Expand Down

0 comments on commit de2e8e3

Please sign in to comment.