Skip to content

Commit

Permalink
Fix spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
alexymumo committed Mar 18, 2024
1 parent 8ffd66c commit c8aef22
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Card
import androidx.compose.material3.Divider
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2024 News-App
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alexmumo.presentation.bookmarks

import androidx.compose.ui.test.junit4.createComposeRule
Expand Down Expand Up @@ -34,4 +49,4 @@ class BookMarkScreenTest {
composeRule.onNodeWithTag("top_app_bar_test_tag").assertExists()
composeRule.onNodeWithTag("bookmark_test_tag").assertExists()
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2024 News-App
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alexmumo.presentation.bookmarks.view

import androidx.compose.ui.test.junit4.createComposeRule
Expand All @@ -12,7 +27,6 @@ import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.shadows.ShadowLog


@RunWith(RobolectricTestRunner::class)
class BookMarkItemTest {

Expand All @@ -35,9 +49,10 @@ class BookMarkItemTest {
composeRule.onNodeWithTag("divider_tag").assertExists()
}

companion object{
val bookMarkEntity = BookMarkEntity(author = null, content = null,description = null,publishedAt = null,
companion object {
val bookMarkEntity = BookMarkEntity(
author = null, content = null, description = null, publishedAt = null,
SourceEntity(id = null, name = ""), title = null, url = "", urlToImage = null, isBookMarked = false
)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2024 News-App
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alexmumo.presentation.components

import androidx.compose.ui.test.junit4.createComposeRule
Expand All @@ -11,7 +26,6 @@ import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.shadows.ShadowLog


@RunWith(RobolectricTestRunner::class)
class NewsCardTest {

Expand All @@ -29,12 +43,12 @@ class NewsCardTest {
composeRule.setContent {
NewsCard(onNavigate = {}, article = article)
}
composeRule.onNodeWithTag("news_card_test_tag",useUnmergedTree = true).assertExists()
composeRule.onNodeWithTag("news_card_test_tag", useUnmergedTree = true).assertExists()
}

companion object{
companion object {
val article = Article(
author = null, content = null, description = null, publishedAt = null, Source(id = null, name = ""), title = null, url = "", urlToImage = null
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.alexmumo.presentation.detail

import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onAllNodesWithContentDescription
import androidx.compose.ui.test.onNodeWithContentDescription
import androidx.compose.ui.test.onNodeWithTag
import androidx.navigation.compose.rememberNavController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package com.alexmumo.presentation.home

import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performClick
import androidx.navigation.compose.rememberNavController
import com.alexmumo.domain.repository.NewsRepository
import io.mockk.mockk
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
/*
* Copyright 2024 News-App
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alexmumo.presentation.settings.view

import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner


@RunWith(RobolectricTestRunner::class)
class SettingCardTest {

@
fun setUp() {

}

}

0 comments on commit c8aef22

Please sign in to comment.