diff --git a/Common/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.android.kt b/Common/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.android.kt deleted file mode 100644 index 596b75b6..00000000 --- a/Common/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.android.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.common - -class AndroidPlatform : Platform { - override val name: String = "Android ${android.os.Build.VERSION.SDK_INT}" -} - -actual fun getPlatform(): Platform = AndroidPlatform() diff --git a/Common/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Test.android.kt b/Common/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Test.android.kt deleted file mode 100644 index 8263990f..00000000 --- a/Common/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Test.android.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.common - -import org.junit.Assert.assertTrue -import org.junit.Test - -class AndroidGreetingTest { - - @Test - fun testExample() { - assertTrue("Check platform is android", getPlatform().name.contains("Android")) - } -} diff --git a/Common/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.kt b/Common/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.kt deleted file mode 100644 index 024fc553..00000000 --- a/Common/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.common - -interface Platform { - val name: String -} - -expect fun getPlatform(): Platform diff --git a/Common/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.ios.kt b/Common/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.ios.kt deleted file mode 100644 index 875584fc..00000000 --- a/Common/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.ios.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.common - -import platform.UIKit.UIDevice - -class IOSPlatform : Platform { - override val name: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion -} - -actual fun getPlatform(): Platform = IOSPlatform() diff --git a/Common/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Test.ios.kt b/Common/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Test.ios.kt deleted file mode 100644 index 06d803a0..00000000 --- a/Common/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Test.ios.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.common - -import kotlin.test.Test -import kotlin.test.assertEquals - -class IosGreetingTest { - - @Test - fun testExample() { - assertEquals(4, 2 + 2, "Check for correct addition") - } -} diff --git a/Common/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.macos.kt b/Common/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.macos.kt deleted file mode 100644 index 9e193d77..00000000 --- a/Common/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/Platform.macos.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.common - -class MacOSPlatform : Platform { - override val name: String = "MacOS" -} - -actual fun getPlatform(): Platform = MacOSPlatform() diff --git a/Core/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.android.kt b/Core/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.android.kt deleted file mode 100644 index 2718ee83..00000000 --- a/Core/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.android.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer - -class AndroidPlatform : Platform { - override val name: String = "Android ${android.os.Build.VERSION.SDK_INT}" -} - -actual fun getPlatform(): Platform = AndroidPlatform() diff --git a/Core/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/Test.android.kt b/Core/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/Test.android.kt deleted file mode 100644 index 179857f9..00000000 --- a/Core/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/Test.android.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer - -import org.junit.Assert.assertTrue -import org.junit.Test - -class AndroidGreetingTest { - - @Test - fun testExample() { - assertTrue("Check platform is android", getPlatform().name.contains("Android")) - } -} diff --git a/Core/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.kt b/Core/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.kt deleted file mode 100644 index 40dbbf70..00000000 --- a/Core/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer - -interface Platform { - val name: String -} - -expect fun getPlatform(): Platform diff --git a/Core/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.ios.kt b/Core/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.ios.kt deleted file mode 100644 index 3c07da15..00000000 --- a/Core/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.ios.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer - -import platform.UIKit.UIDevice - -class IOSPlatform : Platform { - override val name: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion -} - -actual fun getPlatform(): Platform = IOSPlatform() diff --git a/Core/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/Test.ios.kt b/Core/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/Test.ios.kt deleted file mode 100644 index b2c501a2..00000000 --- a/Core/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/Test.ios.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer - -import kotlin.test.Test -import kotlin.test.assertEquals - -class IosGreetingTest { - - @Test - fun testExample() { - assertEquals(4, 2 + 2, "Check for correct addition") - } -} diff --git a/Core/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.macos.kt b/Core/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.macos.kt deleted file mode 100644 index 374cae9f..00000000 --- a/Core/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/Platform.macos.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer - -class MacOSPlatform : Platform { - override val name: String = "MacOS" -} - -actual fun getPlatform(): Platform = MacOSPlatform() diff --git a/Database/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.android.kt b/Database/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.android.kt deleted file mode 100644 index dc88533a..00000000 --- a/Database/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.android.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.database - -class AndroidPlatform : Platform { - override val name: String = "Android ${android.os.Build.VERSION.SDK_INT}" -} - -actual fun getPlatform(): Platform = AndroidPlatform() diff --git a/Database/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.android.kt b/Database/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.android.kt deleted file mode 100644 index 53c4d3b8..00000000 --- a/Database/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.android.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.database - -import org.junit.Assert.assertTrue -import org.junit.Test - -class AndroidGreetingTest { - - @Test - fun testExample() { - assertTrue("Check platform is android", getPlatform().name.contains("Android")) - } -} diff --git a/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.kt b/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.kt deleted file mode 100644 index b8663921..00000000 --- a/Database/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.database - -interface Platform { - val name: String -} - -expect fun getPlatform(): Platform diff --git a/Database/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.ios.kt b/Database/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.ios.kt deleted file mode 100644 index 120117ab..00000000 --- a/Database/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.ios.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.database - -import platform.UIKit.UIDevice - -class IOSPlatform : Platform { - override val name: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion -} - -actual fun getPlatform(): Platform = IOSPlatform() diff --git a/Database/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.ios.kt b/Database/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.ios.kt deleted file mode 100644 index 667107b8..00000000 --- a/Database/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Test.ios.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.database - -import kotlin.test.Test -import kotlin.test.assertEquals - -class IosGreetingTest { - - @Test - fun testExample() { - assertEquals(4, 2 + 2, "Check for correct addition") - } -} diff --git a/Database/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.macos.kt b/Database/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.macos.kt deleted file mode 100644 index df0b5eec..00000000 --- a/Database/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/database/Platform.macos.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.database - -class MacOSPlatform : Platform { - override val name: String = "MacOS" -} - -actual fun getPlatform(): Platform = MacOSPlatform() diff --git a/Network/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.android.kt b/Network/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.android.kt deleted file mode 100644 index 77b3ec28..00000000 --- a/Network/src/androidMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.android.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.network - -class AndroidPlatform : Platform { - override val name: String = "Android ${android.os.Build.VERSION.SDK_INT}" -} - -actual fun getPlatform(): Platform = AndroidPlatform() diff --git a/Network/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Test.android.kt b/Network/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Test.android.kt deleted file mode 100644 index 5d9b4cd0..00000000 --- a/Network/src/androidUnitTest/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Test.android.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.network - -import org.junit.Assert.assertTrue -import org.junit.Test - -class AndroidGreetingTest { - - @Test - fun testExample() { - assertTrue("Check platform is android", getPlatform().name.contains("Android")) - } -} diff --git a/Network/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.kt b/Network/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.kt deleted file mode 100644 index 2cf81445..00000000 --- a/Network/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.network - -interface Platform { - val name: String -} - -expect fun getPlatform(): Platform diff --git a/Network/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.ios.kt b/Network/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.ios.kt deleted file mode 100644 index 0ebffc2e..00000000 --- a/Network/src/iosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.ios.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.network - -import platform.UIKit.UIDevice - -class IOSPlatform : Platform { - override val name: String = UIDevice.currentDevice.systemName() + " " + UIDevice.currentDevice.systemVersion -} - -actual fun getPlatform(): Platform = IOSPlatform() diff --git a/Network/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Test.ios.kt b/Network/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Test.ios.kt deleted file mode 100644 index 96c7f841..00000000 --- a/Network/src/iosTest/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Test.ios.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.network - -import kotlin.test.Test -import kotlin.test.assertEquals - -class IosGreetingTest { - - @Test - fun testExample() { - assertEquals(4, 2 + 2, "Check for correct addition") - } -} diff --git a/Network/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.macos.kt b/Network/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.macos.kt deleted file mode 100644 index 6fce2633..00000000 --- a/Network/src/macosMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/Platform.macos.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Infomaniak SwissTransfer - Multiplatform - * Copyright (C) 2024 Infomaniak Network SA - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.infomaniak.multiplatform_swisstransfer.network - -class MacOSPlatform : Platform { - override val name: String = "MacOS" -} - -actual fun getPlatform(): Platform = MacOSPlatform()