Rename package to cy.hexor.furumi, add F-Droid compatibility
- Rename applicationId and all sources from com.example.furumi_android to cy.hexor.furumi - Add WTFPL LICENSE - Add fastlane metadata - Add fdroiddata build metadata cy.hexor.furumi.yml - Remove foojay-resolver plugin (blocked by F-Droid scanner) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package cy.hexor.furumi
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package cy.hexor.furumi.domain.model
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Test
|
||||
|
||||
class ServerConfigTest {
|
||||
@Test
|
||||
fun normalizeBaseUrl_addsHttpsWhenSchemeIsMissing() {
|
||||
val result = ServerConfig.normalizeBaseUrl("media.example.com")
|
||||
|
||||
assertEquals("https://media.example.com", result.getOrThrow())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun normalizeBaseUrl_trimsTrailingSlashButKeepsPath() {
|
||||
val result = ServerConfig.normalizeBaseUrl(" https://media.example.com/furumi/ ")
|
||||
|
||||
assertEquals("https://media.example.com/furumi", result.getOrThrow())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun normalizeBaseUrl_rejectsQueryStrings() {
|
||||
val result = ServerConfig.normalizeBaseUrl("https://media.example.com?token=bad")
|
||||
|
||||
assertTrue(result.isFailure)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun credentials_requireLogin() {
|
||||
val result = ServerConfig.credentials("https://media.example.com", " ")
|
||||
|
||||
assertTrue(result.isFailure)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user