-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate FragmentContract and Integration. (#279)
* Deprecate FragmentContract and Integration. * Rename.
- Loading branch information
Showing
37 changed files
with
361 additions
and
419 deletions.
There are no files selected for viewing
17 changes: 0 additions & 17 deletions
17
formula-android-tests/src/main/java/com/instacart/formula/test/TestContract.kt
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
formula-android-tests/src/main/java/com/instacart/formula/test/TestContractWithId.kt
This file was deleted.
Oops, something went wrong.
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
24 changes: 0 additions & 24 deletions
24
formula-android-tests/src/main/java/com/instacart/formula/test/TestFragmentComponent.kt
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
...a-android-tests/src/main/java/com/instacart/formula/test/TestFragmentLifecycleCallback.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.instacart.formula.test | ||
|
||
import android.os.Bundle | ||
import android.view.View | ||
import com.instacart.formula.android.FragmentLifecycleCallback | ||
|
||
class TestFragmentLifecycleCallback : FragmentLifecycleCallback { | ||
var hasOnViewCreated = false | ||
var hasOnActivityCreated = false | ||
var hasOnStart = false | ||
var hasOnResume = false | ||
var hasOnPauseEvent = false | ||
var hasOnStop = false | ||
var hasOnSaveInstanceState = false | ||
var hasOnDestroyView = false | ||
|
||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
hasOnViewCreated = true | ||
} | ||
|
||
override fun onActivityCreated(savedInstanceState: Bundle?) { | ||
hasOnActivityCreated = true | ||
} | ||
|
||
override fun onStart() { | ||
hasOnStart = true | ||
} | ||
|
||
override fun onResume() { | ||
hasOnResume = true | ||
} | ||
|
||
// teardown | ||
override fun onPause() { | ||
hasOnPauseEvent = true | ||
} | ||
|
||
override fun onStop() { | ||
hasOnStop = true | ||
} | ||
|
||
override fun onSaveInstanceState(outState: Bundle) { | ||
hasOnSaveInstanceState = true | ||
} | ||
|
||
override fun onDestroyView() { | ||
hasOnDestroyView | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
formula-android-tests/src/main/java/com/instacart/formula/test/TestKey.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.instacart.formula.test | ||
|
||
import com.instacart.formula.android.FragmentKey | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class TestKey( | ||
override val tag: String = "test key", | ||
) : FragmentKey |
10 changes: 10 additions & 0 deletions
10
formula-android-tests/src/main/java/com/instacart/formula/test/TestKeyWithId.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.instacart.formula.test | ||
|
||
import com.instacart.formula.android.FragmentKey | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class TestKeyWithId( | ||
val id: Int, | ||
override val tag: String = "test-key-$id", | ||
) : FragmentKey |
72 changes: 0 additions & 72 deletions
72
formula-android-tests/src/main/java/com/instacart/formula/test/TestLifecycleContract.kt
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
formula-android-tests/src/main/java/com/instacart/formula/test/TestLifecycleKey.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.instacart.formula.test | ||
|
||
import com.instacart.formula.android.FragmentKey | ||
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class TestLifecycleKey( | ||
override val tag: String = "task list", | ||
) : FragmentKey |
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
Oops, something went wrong.