diff --git a/app/src/test/java/org/mozilla/fenix/components/bookmarks/BookmarksUseCaseTest.kt b/app/src/test/java/org/mozilla/fenix/components/bookmarks/BookmarksUseCaseTest.kt index e099564513..549eababa3 100644 --- a/app/src/test/java/org/mozilla/fenix/components/bookmarks/BookmarksUseCaseTest.kt +++ b/app/src/test/java/org/mozilla/fenix/components/bookmarks/BookmarksUseCaseTest.kt @@ -72,7 +72,7 @@ class BookmarksUseCaseTest { BookmarkNodeType.ITEM, "987", "123", - 2, + 2u, "Firefox", "https://www.firefox.com", 0, diff --git a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkAdapterTest.kt b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkAdapterTest.kt index 7c053630e2..92f029fd82 100644 --- a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkAdapterTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkAdapterTest.kt @@ -133,7 +133,7 @@ internal class BookmarkAdapterTest { val item = testBookmarkItem("someFolder", "http://mozilla.org") assertTrue(createSingleItemDiffUtil(item, item).areContentsTheSame(0, 0)) assertFalse( - createSingleItemDiffUtil(item, item.copy(position = 1)).areContentsTheSame(0, 0) + createSingleItemDiffUtil(item, item.copy(position = 1u)).areContentsTheSame(0, 0) ) assertFalse( createSingleItemDiffUtil( diff --git a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkControllerTest.kt b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkControllerTest.kt index 6fcbacc65f..b72a931823 100644 --- a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkControllerTest.kt @@ -56,14 +56,14 @@ class BookmarkControllerTest { private val addNewTabUseCase: TabsUseCases.AddNewTabUseCase = mockk(relaxed = true) private val item = - BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0, "Mozilla", "http://mozilla.org", 0, null) + BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0u, "Mozilla", "http://mozilla.org", 0, null) private val subfolder = - BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0, "Subfolder", null, 0, listOf()) + BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0u, "Subfolder", null, 0, listOf()) private val childItem = BookmarkNode( BookmarkNodeType.ITEM, "987", "123", - 2, + 2u, "Firefox", "https://www.mozilla.org/en-US/firefox/", 0, @@ -73,14 +73,14 @@ class BookmarkControllerTest { BookmarkNodeType.FOLDER, "123", null, - 0, + 0u, "Mobile", null, 0, listOf(item, item, childItem, subfolder) ) private val root = BookmarkNode( - BookmarkNodeType.FOLDER, BookmarkRoot.Root.id, null, 0, BookmarkRoot.Root.name, null, 0, null + BookmarkNodeType.FOLDER, BookmarkRoot.Root.id, null, 0u, BookmarkRoot.Root.name, null, 0, null ) @Before diff --git a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkDeselectNavigationListenerTest.kt b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkDeselectNavigationListenerTest.kt index 1df509257c..52fc517b96 100644 --- a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkDeselectNavigationListenerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkDeselectNavigationListenerTest.kt @@ -24,7 +24,7 @@ class BookmarkDeselectNavigationListenerTest { BookmarkNodeType.ITEM, BookmarkRoot.Root.id, parentGuid = null, - position = 0, + position = 0u, title = null, url = null, dateAdded = 0, diff --git a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractorTest.kt b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractorTest.kt index fac5b2b60d..581e79e8e1 100644 --- a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractorTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractorTest.kt @@ -23,11 +23,11 @@ class BookmarkFragmentInteractorTest { private val bookmarkController: DefaultBookmarkController = mockk(relaxed = true) private val metrics: MetricController = mockk(relaxed = true) - private val item = BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0, "Mozilla", "http://mozilla.org", 0, null) - private val separator = BookmarkNode(BookmarkNodeType.SEPARATOR, "789", "123", 1, null, null, 0, null) - private val subfolder = BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0, "Subfolder", null, 0, listOf()) + private val item = BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0u, "Mozilla", "http://mozilla.org", 0, null) + private val separator = BookmarkNode(BookmarkNodeType.SEPARATOR, "789", "123", 1u, null, null, 0, null) + private val subfolder = BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0u, "Subfolder", null, 0, listOf()) private val tree: BookmarkNode = BookmarkNode( - BookmarkNodeType.FOLDER, "123", null, 0, "Mobile", null, 0, listOf(item, separator, item, subfolder) + BookmarkNodeType.FOLDER, "123", null, 0u, "Mobile", null, 0, listOf(item, separator, item, subfolder) ) @Before diff --git a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentStoreTest.kt b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentStoreTest.kt index 257dd50f73..43e283f98c 100644 --- a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentStoreTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentStoreTest.kt @@ -214,27 +214,27 @@ class BookmarkFragmentStoreTest { assertEquals(BookmarkFragmentState.Mode.Syncing, store.state.mode) } - private val item = BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0, "Mozilla", "http://mozilla.org", 0, null) - private val separator = BookmarkNode(BookmarkNodeType.SEPARATOR, "789", "123", 1, null, null, 0, null) - private val subfolder = BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0, "Subfolder", null, 0, listOf()) + private val item = BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0u, "Mozilla", "http://mozilla.org", 0, null) + private val separator = BookmarkNode(BookmarkNodeType.SEPARATOR, "789", "123", 1u, null, null, 0, null) + private val subfolder = BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0u, "Subfolder", null, 0, listOf()) private val childItem = BookmarkNode( BookmarkNodeType.ITEM, "987", "123", - 2, + 2u, "Firefox", "https://www.mozilla.org/en-US/firefox/", 0, null ) private val tree = BookmarkNode( - BookmarkNodeType.FOLDER, "123", null, 0, "Mobile", null, 0, listOf(item, separator, childItem, subfolder) + BookmarkNodeType.FOLDER, "123", null, 0u, "Mobile", null, 0, listOf(item, separator, childItem, subfolder) ) private val newTree = BookmarkNode( BookmarkNodeType.FOLDER, "123", null, - 0, + 0u, "Mobile", null, 0, @@ -244,7 +244,7 @@ class BookmarkFragmentStoreTest { BookmarkNodeType.FOLDER, "root________", null, - 0, + 0u, "Desktop Bookmarks", null, 0, diff --git a/app/src/test/java/org/mozilla/fenix/library/bookmarks/DesktopFoldersTest.kt b/app/src/test/java/org/mozilla/fenix/library/bookmarks/DesktopFoldersTest.kt index 06644a5bf9..97e66746a3 100644 --- a/app/src/test/java/org/mozilla/fenix/library/bookmarks/DesktopFoldersTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/bookmarks/DesktopFoldersTest.kt @@ -32,7 +32,7 @@ class DesktopFoldersTest { guid = BookmarkRoot.Root.id, parentGuid = null, title = BookmarkRoot.Root.name, - position = 0, + position = 0u, url = null, dateAdded = 0, children = null diff --git a/app/src/test/java/org/mozilla/fenix/library/bookmarks/UtilsKtTest.kt b/app/src/test/java/org/mozilla/fenix/library/bookmarks/UtilsKtTest.kt index 9db1341b2c..0beb0d3b71 100644 --- a/app/src/test/java/org/mozilla/fenix/library/bookmarks/UtilsKtTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/bookmarks/UtilsKtTest.kt @@ -86,7 +86,7 @@ internal fun testBookmarkItem(parentGuid: String, url: String, title: String = " BookmarkNodeType.ITEM, "guid#${Math.random() * 1000}", parentGuid, - 0, + 0u, title, url, 0, @@ -97,7 +97,7 @@ internal fun testFolder(guid: String, parentGuid: String?, children: List