From 6d9c058691d990abd0c71826a03a9aed54a2e460 Mon Sep 17 00:00:00 2001 From: matt-ramotar Date: Sun, 17 Nov 2024 20:14:08 -0500 Subject: [PATCH] Revert "Move util to test_utils" This reverts commit f94a8aa41610dd9770d93ca9c6a753162941a537. --- .../store/store5/ClearAllStoreTests.kt | 6 ++-- .../store/store5/ClearStoreByKeyTests.kt | 6 ++-- .../store/store5/FallbackTests.kt | 10 +++---- .../store/store5/FetcherResponseTests.kt | 2 +- .../store/store5/FlowStoreTests.kt | 12 ++++---- .../store/store5/HotFlowStoreTests.kt | 2 +- .../store/store5/KeyTrackerTests.kt | 2 +- .../store/store5/LocalOnlyTests.kt | 4 +-- .../store/store5/MapIndexedTests.kt | 2 +- .../store/store5/SourceOfTruthErrorsTests.kt | 8 +++--- .../store5/SourceOfTruthWithBarrierTests.kt | 4 +-- .../store5/StreamWithoutSourceOfTruthTests.kt | 4 +-- .../store/store5/UpdaterTests.kt | 28 +++++++++---------- .../store/store5/ValueFetcherTests.kt | 2 +- .../store5/{test_utils => util}/AsFlowable.kt | 2 +- .../AssertEmitsExactly.kt | 2 +- .../{test_utils => util}/FakeFetcher.kt | 2 +- .../{test_utils => util}/InMemoryPersister.kt | 2 +- .../store5/{test_utils => util}/TestApi.kt | 2 +- .../{test_utils => util}/TestStoreExt.kt | 2 +- .../fake/NoteCollections.kt | 4 +-- .../store5/{test_utils => util}/fake/Notes.kt | 4 +-- .../{test_utils => util}/fake/NotesApi.kt | 12 ++++---- .../fake/NotesBookkeeping.kt | 2 +- .../fake/NotesConverterProvider.kt | 8 +++--- .../fake/NotesDatabase.kt | 6 ++-- .../{test_utils => util}/fake/NotesKey.kt | 2 +- .../fake/NotesUpdaterProvider.kt | 8 +++--- .../fake/NotesValidator.kt | 4 +-- .../fake/fallback/HardcodedPages.kt | 2 +- .../fake/fallback/Page.kt | 2 +- .../fake/fallback/PagesDatabase.kt | 2 +- .../fake/fallback/PrimaryPagesApi.kt | 2 +- .../fake/fallback/SecondaryPagesApi.kt | 2 +- .../{test_utils => util}/model/NoteData.kt | 4 +-- 35 files changed, 84 insertions(+), 84 deletions(-) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/AsFlowable.kt (98%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/AssertEmitsExactly.kt (84%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/FakeFetcher.kt (97%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/InMemoryPersister.kt (96%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/TestApi.kt (83%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/TestStoreExt.kt (93%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/NoteCollections.kt (56%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/Notes.kt (79%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/NotesApi.kt (80%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/NotesBookkeeping.kt (93%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/NotesConverterProvider.kt (68%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/NotesDatabase.kt (80%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/NotesKey.kt (67%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/NotesUpdaterProvider.kt (67%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/NotesValidator.kt (73%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/fallback/HardcodedPages.kt (81%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/fallback/Page.kt (66%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/fallback/PagesDatabase.kt (77%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/fallback/PrimaryPagesApi.kt (86%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/fake/fallback/SecondaryPagesApi.kt (82%) rename store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/{test_utils => util}/model/NoteData.kt (81%) diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ClearAllStoreTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ClearAllStoreTests.kt index 41f7a80a9..a871a0665 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ClearAllStoreTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ClearAllStoreTests.kt @@ -6,9 +6,9 @@ import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.advanceUntilIdle import kotlinx.coroutines.test.runTest import org.mobilenativefoundation.store.core5.ExperimentalStoreApi -import org.mobilenativefoundation.store.store5.test_utils.InMemoryPersister -import org.mobilenativefoundation.store.store5.test_utils.asSourceOfTruth -import org.mobilenativefoundation.store.store5.test_utils.getData +import org.mobilenativefoundation.store.store5.util.InMemoryPersister +import org.mobilenativefoundation.store.store5.util.asSourceOfTruth +import org.mobilenativefoundation.store.store5.util.getData import kotlin.test.BeforeTest import kotlin.test.Test import kotlin.test.assertEquals diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ClearStoreByKeyTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ClearStoreByKeyTests.kt index cf6b1b6f2..e08556b44 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ClearStoreByKeyTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ClearStoreByKeyTests.kt @@ -5,9 +5,9 @@ import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest import org.mobilenativefoundation.store.store5.StoreReadResponse.Data -import org.mobilenativefoundation.store.store5.test_utils.InMemoryPersister -import org.mobilenativefoundation.store.store5.test_utils.asSourceOfTruth -import org.mobilenativefoundation.store.store5.test_utils.getData +import org.mobilenativefoundation.store.store5.util.InMemoryPersister +import org.mobilenativefoundation.store.store5.util.asSourceOfTruth +import org.mobilenativefoundation.store.store5.util.getData import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertNull diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FallbackTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FallbackTests.kt index 29cfae8a4..d18cc79db 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FallbackTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FallbackTests.kt @@ -4,11 +4,11 @@ import kotlinx.coroutines.flow.take import kotlinx.coroutines.flow.toList import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest -import org.mobilenativefoundation.store.store5.test_utils.fake.fallback.HardcodedPages -import org.mobilenativefoundation.store.store5.test_utils.fake.fallback.Page -import org.mobilenativefoundation.store.store5.test_utils.fake.fallback.PagesDatabase -import org.mobilenativefoundation.store.store5.test_utils.fake.fallback.PrimaryPagesApi -import org.mobilenativefoundation.store.store5.test_utils.fake.fallback.SecondaryPagesApi +import org.mobilenativefoundation.store.store5.util.fake.fallback.HardcodedPages +import org.mobilenativefoundation.store.store5.util.fake.fallback.Page +import org.mobilenativefoundation.store.store5.util.fake.fallback.PagesDatabase +import org.mobilenativefoundation.store.store5.util.fake.fallback.PrimaryPagesApi +import org.mobilenativefoundation.store.store5.util.fake.fallback.SecondaryPagesApi import kotlin.test.BeforeTest import kotlin.test.Test import kotlin.test.assertEquals diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FetcherResponseTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FetcherResponseTests.kt index 8712f5457..4f009f849 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FetcherResponseTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FetcherResponseTests.kt @@ -7,7 +7,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.toList import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest -import org.mobilenativefoundation.store.store5.test_utils.assertEmitsExactly +import org.mobilenativefoundation.store.store5.util.assertEmitsExactly import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFailsWith diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FlowStoreTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FlowStoreTests.kt index afd9703e5..af2a2f2d7 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FlowStoreTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/FlowStoreTests.kt @@ -34,12 +34,12 @@ import kotlinx.coroutines.test.runTest import org.mobilenativefoundation.store.store5.StoreReadResponse.Data import org.mobilenativefoundation.store.store5.StoreReadResponse.Loading import org.mobilenativefoundation.store.store5.impl.extensions.fresh -import org.mobilenativefoundation.store.store5.test_utils.FakeFetcher -import org.mobilenativefoundation.store.store5.test_utils.FakeFlowingFetcher -import org.mobilenativefoundation.store.store5.test_utils.InMemoryPersister -import org.mobilenativefoundation.store.store5.test_utils.asFlowable -import org.mobilenativefoundation.store.store5.test_utils.asSourceOfTruth -import org.mobilenativefoundation.store.store5.test_utils.assertEmitsExactly +import org.mobilenativefoundation.store.store5.util.FakeFetcher +import org.mobilenativefoundation.store.store5.util.FakeFlowingFetcher +import org.mobilenativefoundation.store.store5.util.InMemoryPersister +import org.mobilenativefoundation.store.store5.util.asFlowable +import org.mobilenativefoundation.store.store5.util.asSourceOfTruth +import org.mobilenativefoundation.store.store5.util.assertEmitsExactly import kotlin.test.Test import kotlin.test.assertContains import kotlin.test.assertEquals diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/HotFlowStoreTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/HotFlowStoreTests.kt index a258251c8..fdc905e74 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/HotFlowStoreTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/HotFlowStoreTests.kt @@ -6,7 +6,7 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest -import org.mobilenativefoundation.store.store5.test_utils.assertEmitsExactly +import org.mobilenativefoundation.store.store5.util.assertEmitsExactly import kotlin.test.Test import kotlin.test.assertEquals diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/KeyTrackerTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/KeyTrackerTests.kt index ed343bf0f..a38fb4d10 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/KeyTrackerTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/KeyTrackerTests.kt @@ -10,7 +10,7 @@ import kotlinx.coroutines.launch import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.advanceUntilIdle import kotlinx.coroutines.test.runTest -import org.mobilenativefoundation.store.store5.test_utils.KeyTracker +import org.mobilenativefoundation.store.store5.util.KeyTracker import kotlin.test.Test import kotlin.test.assertEquals diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/LocalOnlyTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/LocalOnlyTests.kt index e969b591a..632478bda 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/LocalOnlyTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/LocalOnlyTests.kt @@ -5,8 +5,8 @@ import kotlinx.coroutines.flow.first import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest import org.mobilenativefoundation.store.store5.impl.extensions.get -import org.mobilenativefoundation.store.store5.test_utils.InMemoryPersister -import org.mobilenativefoundation.store.store5.test_utils.asSourceOfTruth +import org.mobilenativefoundation.store.store5.util.InMemoryPersister +import org.mobilenativefoundation.store.store5.util.asSourceOfTruth import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/MapIndexedTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/MapIndexedTests.kt index 37af42159..a1650e13d 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/MapIndexedTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/MapIndexedTests.kt @@ -5,7 +5,7 @@ import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest import org.mobilenativefoundation.store.store5.impl.operators.mapIndexed -import org.mobilenativefoundation.store.store5.test_utils.assertEmitsExactly +import org.mobilenativefoundation.store.store5.util.assertEmitsExactly import kotlin.test.Test @OptIn(ExperimentalCoroutinesApi::class) diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/SourceOfTruthErrorsTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/SourceOfTruthErrorsTests.kt index 2fb7ce6db..200b0ae2c 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/SourceOfTruthErrorsTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/SourceOfTruthErrorsTests.kt @@ -12,10 +12,10 @@ import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest import org.mobilenativefoundation.store.store5.SourceOfTruth.ReadException import org.mobilenativefoundation.store.store5.SourceOfTruth.WriteException -import org.mobilenativefoundation.store.store5.test_utils.FakeFetcher -import org.mobilenativefoundation.store.store5.test_utils.InMemoryPersister -import org.mobilenativefoundation.store.store5.test_utils.asSourceOfTruth -import org.mobilenativefoundation.store.store5.test_utils.assertEmitsExactly +import org.mobilenativefoundation.store.store5.util.FakeFetcher +import org.mobilenativefoundation.store.store5.util.InMemoryPersister +import org.mobilenativefoundation.store.store5.util.asSourceOfTruth +import org.mobilenativefoundation.store.store5.util.assertEmitsExactly import kotlin.test.Test @OptIn(ExperimentalCoroutinesApi::class) diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/SourceOfTruthWithBarrierTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/SourceOfTruthWithBarrierTests.kt index a14616d95..1cbab5218 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/SourceOfTruthWithBarrierTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/SourceOfTruthWithBarrierTests.kt @@ -31,8 +31,8 @@ import org.mobilenativefoundation.store.store5.SourceOfTruth.ReadException import org.mobilenativefoundation.store.store5.SourceOfTruth.WriteException import org.mobilenativefoundation.store.store5.impl.PersistentSourceOfTruth import org.mobilenativefoundation.store.store5.impl.SourceOfTruthWithBarrier -import org.mobilenativefoundation.store.store5.test_utils.InMemoryPersister -import org.mobilenativefoundation.store.store5.test_utils.assertEmitsExactly +import org.mobilenativefoundation.store.store5.util.InMemoryPersister +import org.mobilenativefoundation.store.store5.util.assertEmitsExactly import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertNull diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/StreamWithoutSourceOfTruthTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/StreamWithoutSourceOfTruthTests.kt index 3674108fe..8610aa233 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/StreamWithoutSourceOfTruthTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/StreamWithoutSourceOfTruthTests.kt @@ -8,8 +8,8 @@ import kotlinx.coroutines.flow.take import kotlinx.coroutines.flow.toList import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest -import org.mobilenativefoundation.store.store5.test_utils.FakeFetcher -import org.mobilenativefoundation.store.store5.test_utils.assertEmitsExactly +import org.mobilenativefoundation.store.store5.util.FakeFetcher +import org.mobilenativefoundation.store.store5.util.assertEmitsExactly import kotlin.test.Test import kotlin.test.assertEquals diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/UpdaterTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/UpdaterTests.kt index 7135c0561..72ae4270b 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/UpdaterTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/UpdaterTests.kt @@ -9,20 +9,20 @@ import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest import org.mobilenativefoundation.store.core5.ExperimentalStoreApi import org.mobilenativefoundation.store.store5.impl.extensions.inHours -import org.mobilenativefoundation.store.store5.test_utils.assertEmitsExactly -import org.mobilenativefoundation.store.store5.test_utils.fake.Notes -import org.mobilenativefoundation.store.store5.test_utils.fake.NotesApi -import org.mobilenativefoundation.store.store5.test_utils.fake.NotesBookkeeping -import org.mobilenativefoundation.store.store5.test_utils.fake.NotesConverterProvider -import org.mobilenativefoundation.store.store5.test_utils.fake.NotesDatabase -import org.mobilenativefoundation.store.store5.test_utils.fake.NotesKey -import org.mobilenativefoundation.store.store5.test_utils.fake.NotesUpdaterProvider -import org.mobilenativefoundation.store.store5.test_utils.fake.NotesValidator -import org.mobilenativefoundation.store.store5.test_utils.model.InputNote -import org.mobilenativefoundation.store.store5.test_utils.model.NetworkNote -import org.mobilenativefoundation.store.store5.test_utils.model.NoteData -import org.mobilenativefoundation.store.store5.test_utils.model.NotesWriteResponse -import org.mobilenativefoundation.store.store5.test_utils.model.OutputNote +import org.mobilenativefoundation.store.store5.util.assertEmitsExactly +import org.mobilenativefoundation.store.store5.util.fake.Notes +import org.mobilenativefoundation.store.store5.util.fake.NotesApi +import org.mobilenativefoundation.store.store5.util.fake.NotesBookkeeping +import org.mobilenativefoundation.store.store5.util.fake.NotesConverterProvider +import org.mobilenativefoundation.store.store5.util.fake.NotesDatabase +import org.mobilenativefoundation.store.store5.util.fake.NotesKey +import org.mobilenativefoundation.store.store5.util.fake.NotesUpdaterProvider +import org.mobilenativefoundation.store.store5.util.fake.NotesValidator +import org.mobilenativefoundation.store.store5.util.model.InputNote +import org.mobilenativefoundation.store.store5.util.model.NetworkNote +import org.mobilenativefoundation.store.store5.util.model.NoteData +import org.mobilenativefoundation.store.store5.util.model.NotesWriteResponse +import org.mobilenativefoundation.store.store5.util.model.OutputNote import kotlin.test.BeforeTest import kotlin.test.Test import kotlin.test.assertEquals diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ValueFetcherTests.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ValueFetcherTests.kt index a82b3d8ac..3e138597f 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ValueFetcherTests.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/ValueFetcherTests.kt @@ -6,7 +6,7 @@ import kotlinx.coroutines.flow.flow import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest -import org.mobilenativefoundation.store.store5.test_utils.assertEmitsExactly +import org.mobilenativefoundation.store.store5.util.assertEmitsExactly import kotlin.test.Test @ExperimentalCoroutinesApi diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/AsFlowable.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/AsFlowable.kt similarity index 98% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/AsFlowable.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/AsFlowable.kt index de65efa2b..60d8bb9ca 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/AsFlowable.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/AsFlowable.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils +package org.mobilenativefoundation.store.store5.util import kotlinx.coroutines.NonCancellable import kotlinx.coroutines.channels.BufferOverflow diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/AssertEmitsExactly.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/AssertEmitsExactly.kt similarity index 84% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/AssertEmitsExactly.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/AssertEmitsExactly.kt index a0802e46a..c6572c9dc 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/AssertEmitsExactly.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/AssertEmitsExactly.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils +package org.mobilenativefoundation.store.store5.util import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.take diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/FakeFetcher.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/FakeFetcher.kt similarity index 97% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/FakeFetcher.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/FakeFetcher.kt index 6c2496b49..dd8c88efe 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/FakeFetcher.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/FakeFetcher.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.mobilenativefoundation.store.store5.test_utils +package org.mobilenativefoundation.store.store5.util import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/InMemoryPersister.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/InMemoryPersister.kt similarity index 96% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/InMemoryPersister.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/InMemoryPersister.kt index 699f5bf1f..0ba8d1f32 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/InMemoryPersister.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/InMemoryPersister.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils +package org.mobilenativefoundation.store.store5.util import org.mobilenativefoundation.store.store5.SourceOfTruth diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/TestApi.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/TestApi.kt similarity index 83% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/TestApi.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/TestApi.kt index 6d654f0dc..778021e9d 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/TestApi.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/TestApi.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils +package org.mobilenativefoundation.store.store5.util internal interface TestApi { fun get( diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/TestStoreExt.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/TestStoreExt.kt similarity index 93% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/TestStoreExt.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/TestStoreExt.kt index 1e8120b05..87e3f1679 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/TestStoreExt.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/TestStoreExt.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils +package org.mobilenativefoundation.store.store5.util import kotlinx.coroutines.flow.filterNot import kotlinx.coroutines.flow.first diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NoteCollections.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NoteCollections.kt similarity index 56% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NoteCollections.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NoteCollections.kt index 6b217060d..8482cff6f 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NoteCollections.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NoteCollections.kt @@ -1,6 +1,6 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake +package org.mobilenativefoundation.store.store5.util.fake -import org.mobilenativefoundation.store.store5.test_utils.model.NoteData +import org.mobilenativefoundation.store.store5.util.model.NoteData internal object NoteCollections { object Keys { diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/Notes.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/Notes.kt similarity index 79% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/Notes.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/Notes.kt index a75d80fb6..cfc4c6e75 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/Notes.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/Notes.kt @@ -1,6 +1,6 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake +package org.mobilenativefoundation.store.store5.util.fake -import org.mobilenativefoundation.store.store5.test_utils.model.Note +import org.mobilenativefoundation.store.store5.util.model.Note internal object Notes { val One = Note("1", "Title-1", "Content-1") diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesApi.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesApi.kt similarity index 80% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesApi.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesApi.kt index 03448a544..f7de9e21b 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesApi.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesApi.kt @@ -1,10 +1,10 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake +package org.mobilenativefoundation.store.store5.util.fake -import org.mobilenativefoundation.store.store5.test_utils.TestApi -import org.mobilenativefoundation.store.store5.test_utils.model.InputNote -import org.mobilenativefoundation.store.store5.test_utils.model.NetworkNote -import org.mobilenativefoundation.store.store5.test_utils.model.NoteData -import org.mobilenativefoundation.store.store5.test_utils.model.NotesWriteResponse +import org.mobilenativefoundation.store.store5.util.TestApi +import org.mobilenativefoundation.store.store5.util.model.InputNote +import org.mobilenativefoundation.store.store5.util.model.NetworkNote +import org.mobilenativefoundation.store.store5.util.model.NoteData +import org.mobilenativefoundation.store.store5.util.model.NotesWriteResponse internal class NotesApi : TestApi { internal val db = mutableMapOf() diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesBookkeeping.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesBookkeeping.kt similarity index 93% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesBookkeeping.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesBookkeeping.kt index c9ae244a1..61c342820 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesBookkeeping.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesBookkeeping.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake +package org.mobilenativefoundation.store.store5.util.fake class NotesBookkeeping { private val log: MutableMap = mutableMapOf() diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesConverterProvider.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesConverterProvider.kt similarity index 68% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesConverterProvider.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesConverterProvider.kt index 9841a3f3e..ee89216da 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesConverterProvider.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesConverterProvider.kt @@ -1,10 +1,10 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake +package org.mobilenativefoundation.store.store5.util.fake import org.mobilenativefoundation.store.store5.Converter import org.mobilenativefoundation.store.store5.impl.extensions.inHours -import org.mobilenativefoundation.store.store5.test_utils.model.InputNote -import org.mobilenativefoundation.store.store5.test_utils.model.NetworkNote -import org.mobilenativefoundation.store.store5.test_utils.model.OutputNote +import org.mobilenativefoundation.store.store5.util.model.InputNote +import org.mobilenativefoundation.store.store5.util.model.NetworkNote +import org.mobilenativefoundation.store.store5.util.model.OutputNote internal class NotesConverterProvider { fun provide(): Converter = diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesDatabase.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesDatabase.kt similarity index 80% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesDatabase.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesDatabase.kt index 50d453873..063a0a3a9 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesDatabase.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesDatabase.kt @@ -1,7 +1,7 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake +package org.mobilenativefoundation.store.store5.util.fake -import org.mobilenativefoundation.store.store5.test_utils.model.InputNote -import org.mobilenativefoundation.store.store5.test_utils.model.OutputNote +import org.mobilenativefoundation.store.store5.util.model.InputNote +import org.mobilenativefoundation.store.store5.util.model.OutputNote internal class NotesDatabase { private val db: MutableMap = mutableMapOf() diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesKey.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesKey.kt similarity index 67% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesKey.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesKey.kt index 29ddd1d98..25058d3b6 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesKey.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesKey.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake +package org.mobilenativefoundation.store.store5.util.fake sealed class NotesKey { data class Single(val id: String) : NotesKey() diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesUpdaterProvider.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesUpdaterProvider.kt similarity index 67% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesUpdaterProvider.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesUpdaterProvider.kt index 5cc086cc8..35529028e 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesUpdaterProvider.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesUpdaterProvider.kt @@ -1,10 +1,10 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake +package org.mobilenativefoundation.store.store5.util.fake import org.mobilenativefoundation.store.store5.Updater import org.mobilenativefoundation.store.store5.UpdaterResult -import org.mobilenativefoundation.store.store5.test_utils.model.InputNote -import org.mobilenativefoundation.store.store5.test_utils.model.NotesWriteResponse -import org.mobilenativefoundation.store.store5.test_utils.model.OutputNote +import org.mobilenativefoundation.store.store5.util.model.InputNote +import org.mobilenativefoundation.store.store5.util.model.NotesWriteResponse +import org.mobilenativefoundation.store.store5.util.model.OutputNote internal class NotesUpdaterProvider(private val api: NotesApi) { fun provide(): Updater = diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesValidator.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesValidator.kt similarity index 73% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesValidator.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesValidator.kt index 2b1162b7f..bf7296f22 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/NotesValidator.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/NotesValidator.kt @@ -1,8 +1,8 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake +package org.mobilenativefoundation.store.store5.util.fake import org.mobilenativefoundation.store.store5.Validator import org.mobilenativefoundation.store.store5.impl.extensions.now -import org.mobilenativefoundation.store.store5.test_utils.model.OutputNote +import org.mobilenativefoundation.store.store5.util.model.OutputNote internal class NotesValidator(private val expiration: Long = now()) : Validator { override suspend fun isValid(item: OutputNote): Boolean = diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/HardcodedPages.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/HardcodedPages.kt similarity index 81% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/HardcodedPages.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/HardcodedPages.kt index 8e7dda33f..d7c7c9441 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/HardcodedPages.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/HardcodedPages.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake.fallback +package org.mobilenativefoundation.store.store5.util.fake.fallback class HardcodedPages { val name = "HardcodedPages" diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/Page.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/Page.kt similarity index 66% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/Page.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/Page.kt index 826940a12..ccc456277 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/Page.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/Page.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake.fallback +package org.mobilenativefoundation.store.store5.util.fake.fallback sealed class Page { data class Data( diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/PagesDatabase.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/PagesDatabase.kt similarity index 77% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/PagesDatabase.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/PagesDatabase.kt index 0857961ab..3c7a0f245 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/PagesDatabase.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/PagesDatabase.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake.fallback +package org.mobilenativefoundation.store.store5.util.fake.fallback class PagesDatabase { private val db: MutableMap = mutableMapOf() diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/PrimaryPagesApi.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/PrimaryPagesApi.kt similarity index 86% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/PrimaryPagesApi.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/PrimaryPagesApi.kt index 0aa79a164..7c8126702 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/PrimaryPagesApi.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/PrimaryPagesApi.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake.fallback +package org.mobilenativefoundation.store.store5.util.fake.fallback class PrimaryPagesApi { val name = "PrimaryPagesApi" diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/SecondaryPagesApi.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/SecondaryPagesApi.kt similarity index 82% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/SecondaryPagesApi.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/SecondaryPagesApi.kt index 97de292a8..59c3fb398 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/fake/fallback/SecondaryPagesApi.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/fake/fallback/SecondaryPagesApi.kt @@ -1,4 +1,4 @@ -package org.mobilenativefoundation.store.store5.test_utils.fake.fallback +package org.mobilenativefoundation.store.store5.util.fake.fallback class SecondaryPagesApi() { val name: String = "SecondaryPagesApi" diff --git a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/model/NoteData.kt b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/model/NoteData.kt similarity index 81% rename from store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/model/NoteData.kt rename to store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/model/NoteData.kt index ca5e231c5..cce0fc5fa 100644 --- a/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/test_utils/model/NoteData.kt +++ b/store/src/commonTest/kotlin/org/mobilenativefoundation/store/store5/util/model/NoteData.kt @@ -1,6 +1,6 @@ -package org.mobilenativefoundation.store.store5.test_utils.model +package org.mobilenativefoundation.store.store5.util.model -import org.mobilenativefoundation.store.store5.test_utils.fake.NotesKey +import org.mobilenativefoundation.store.store5.util.fake.NotesKey internal sealed class NoteData { data class Single(val item: Note) : NoteData()