[m] Reorganised files and fixed tests
This commit is contained in:
parent
26bb848f3b
commit
dccdd4dbf8
@ -35,7 +35,6 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
||||||
implementation 'androidx.core:core-ktx:1.9.0'
|
implementation 'androidx.core:core-ktx:1.9.0'
|
||||||
@ -45,10 +44,8 @@ dependencies {
|
|||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
|
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
|
||||||
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
|
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
|
||||||
implementation 'androidx.core:core-ktx:1.9.0'
|
|
||||||
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
|
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
tools:replace="android:allowBackup"
|
tools:replace="android:allowBackup"
|
||||||
>
|
>
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".activity.MainActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:theme="@style/Theme.Beendroid.NoActionBar">
|
android:theme="@style/Theme.Beendroid.NoActionBar">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package net.helcel.beendroid
|
package net.helcel.beendroid.activity
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
@ -8,6 +8,7 @@ import android.widget.CheckBox
|
|||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import net.helcel.beendroid.R
|
||||||
import net.helcel.beendroid.countries.GeoLoc
|
import net.helcel.beendroid.countries.GeoLoc
|
||||||
import net.helcel.beendroid.countries.LocType
|
import net.helcel.beendroid.countries.LocType
|
||||||
import java.util.*
|
import java.util.*
|
@ -1,4 +1,4 @@
|
|||||||
package net.helcel.beendroid
|
package net.helcel.beendroid.activity
|
||||||
|
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.Canvas
|
import android.graphics.Canvas
|
||||||
@ -8,8 +8,11 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.caverock.androidsvg.SVG
|
import com.caverock.androidsvg.SVG
|
||||||
import com.caverock.androidsvg.SVGImageView
|
import com.caverock.androidsvg.SVGImageView
|
||||||
|
import net.helcel.beendroid.R
|
||||||
import net.helcel.beendroid.countries.Country
|
import net.helcel.beendroid.countries.Country
|
||||||
import net.helcel.beendroid.countries.WORLD
|
import net.helcel.beendroid.countries.WORLD
|
||||||
|
import net.helcel.beendroid.svg.Level
|
||||||
|
import net.helcel.beendroid.svg.PSVGWrapper
|
||||||
|
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
@ -1,4 +1,4 @@
|
|||||||
package net.helcel.beendroid
|
package net.helcel.beendroid.svg
|
||||||
|
|
||||||
enum class Level(id: Int) {
|
enum class Level(id: Int) {
|
||||||
ZERO(0), ONE(1);
|
ZERO(0), ONE(1);
|
@ -1,4 +1,4 @@
|
|||||||
package net.helcel.beendroid
|
package net.helcel.beendroid.svg
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import net.helcel.beendroid.countries.Country
|
import net.helcel.beendroid.countries.Country
|
@ -1,7 +1,7 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:context="net.helcel.beendroid.MainActivity">
|
tools:context="net.helcel.beendroid.activity.MainActivity">
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_settings"
|
android:id="@+id/action_settings"
|
||||||
android:orderInCategory="100"
|
android:orderInCategory="100"
|
||||||
|
@ -34,7 +34,7 @@ class CountryTest {
|
|||||||
fun allCountriesInAGroup() {
|
fun allCountriesInAGroup() {
|
||||||
Country.values().forEach { c ->
|
Country.values().forEach { c ->
|
||||||
val cnt = CountryGroup.values().none {
|
val cnt = CountryGroup.values().none {
|
||||||
it.countries.contains((c))
|
it.children.contains((c))
|
||||||
}
|
}
|
||||||
Assert.assertEquals("$c has no group !",cnt,false)
|
Assert.assertEquals("$c has no group !",cnt,false)
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ class CountryTest {
|
|||||||
fun allCountriesInASingleGroup() {
|
fun allCountriesInASingleGroup() {
|
||||||
Country.values().forEach { c ->
|
Country.values().forEach { c ->
|
||||||
val cnt = listOf(EEE,FFF,ABB,NNN,SRR,UUU,XXX,ZZZ).count {
|
val cnt = listOf(EEE,FFF,ABB,NNN,SRR,UUU,XXX,ZZZ).count {
|
||||||
it.countries.contains((c))
|
it.children.contains((c))
|
||||||
}
|
}
|
||||||
Assert.assertEquals("$c is in none or multiple continents",cnt,1)
|
Assert.assertEquals("$c is in none or multiple continents",cnt,1)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user