-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a3af37
commit 86fbccd
Showing
218 changed files
with
7,470 additions
and
5,179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
app/android-mock/src/main/java/de/gematik/ti/erp/app/di/MockFeatureModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* Copyright (c) 2024 gematik GmbH | ||
* | ||
* Licensed under the EUPL, Version 1.2 or – as soon they will be approved by | ||
* the European Commission - subsequent versions of the EUPL (the Licence); | ||
* You may not use this work except in compliance with the Licence. | ||
* You may obtain a copy of the Licence at: | ||
* | ||
* https://joinup.ec.europa.eu/software/page/eupl | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the Licence is distributed on an "AS IS" basis, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Licence for the specific language governing permissions and | ||
* limitations under the Licence. | ||
* | ||
*/ | ||
|
||
package de.gematik.ti.erp.app.di | ||
|
||
import de.gematik.ti.erp.app.appsecurity.appSecurityModule | ||
import de.gematik.ti.erp.app.authentication.di.authenticationModule | ||
import de.gematik.ti.erp.app.cardunlock.cardUnlockModule | ||
import de.gematik.ti.erp.app.cardwall.cardWallModule | ||
import de.gematik.ti.erp.app.idp.idpModule | ||
import de.gematik.ti.erp.app.idp.idpUseCaseModule | ||
import de.gematik.ti.erp.app.orderhealthcard.orderHealthCardModule | ||
import de.gematik.ti.erp.app.orders.messageRepositoryModule | ||
import de.gematik.ti.erp.app.orders.messagesModule | ||
import de.gematik.ti.erp.app.pharmacy.di.pharmacyRepositoryModule | ||
import de.gematik.ti.erp.app.pharmacy.pharmacyMockModule | ||
import de.gematik.ti.erp.app.pkv.pkvModule | ||
import de.gematik.ti.erp.app.prescription.prescriptionModule | ||
import de.gematik.ti.erp.app.prescription.prescriptionRepositoryModule | ||
import de.gematik.ti.erp.app.prescription.taskModule | ||
import de.gematik.ti.erp.app.prescription.taskRepositoryModule | ||
import de.gematik.ti.erp.app.profiles.profileRepositoryModule | ||
import de.gematik.ti.erp.app.profiles.profilesModule | ||
import de.gematik.ti.erp.app.protocol.protocolModule | ||
import de.gematik.ti.erp.app.protocol.protocolRepositoryModule | ||
import de.gematik.ti.erp.app.redeem.redeemModule | ||
import de.gematik.ti.erp.app.settings.settingsModule | ||
import de.gematik.ti.erp.app.vau.vauModule | ||
import org.kodein.di.DI | ||
|
||
val mockFeatureModule = DI.Module("featureModule", allowSilentOverride = true) { | ||
importAll( | ||
cardWallModule, | ||
appSecurityModule, | ||
networkModule, | ||
realmModule, | ||
idpModule, | ||
idpUseCaseModule, | ||
messagesModule, | ||
orderHealthCardModule, | ||
redeemModule, | ||
prescriptionModule, | ||
profilesModule, | ||
protocolModule, | ||
taskModule, | ||
settingsModule, | ||
vauModule, | ||
cardUnlockModule, | ||
pkvModule, | ||
authenticationModule, | ||
profileRepositoryModule, | ||
prescriptionRepositoryModule, | ||
protocolRepositoryModule, | ||
pharmacyRepositoryModule, | ||
messageRepositoryModule, | ||
taskRepositoryModule, | ||
// mocked modules | ||
pharmacyMockModule, | ||
allowOverride = true | ||
) | ||
} | ||
|
||
|
71 changes: 71 additions & 0 deletions
71
app/android-mock/src/main/java/de/gematik/ti/erp/app/info/MockBuildConfigInformation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* Copyright (c) 2024 gematik GmbH | ||
* | ||
* Licensed under the EUPL, Version 1.2 or – as soon they will be approved by | ||
* the European Commission - subsequent versions of the EUPL (the Licence); | ||
* You may not use this work except in compliance with the Licence. | ||
* You may obtain a copy of the Licence at: | ||
* | ||
* https://joinup.ec.europa.eu/software/page/eupl | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the Licence is distributed on an "AS IS" basis, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the Licence for the specific language governing permissions and | ||
* limitations under the Licence. | ||
* | ||
*/ | ||
|
||
package de.gematik.ti.erp.app.info | ||
|
||
import android.content.Context | ||
import android.os.Build | ||
import androidx.compose.foundation.isSystemInDarkTheme | ||
import androidx.compose.runtime.Composable | ||
import de.gematik.ti.erp.app.mock.BuildConfig | ||
import java.util.Locale | ||
|
||
private const val DARK_THEME_ON = "an" | ||
private const val DARK_THEME_OFF = "aus" | ||
private const val RELEASE_CANDIDATE = "RC" | ||
private const val SEPARATOR = "-" | ||
private const val SPACE = " " | ||
|
||
class MockBuildConfigInformation : BuildConfigInformation { | ||
|
||
override fun versionName(): String { | ||
BuildConfig.VERSION_NAME.split(RELEASE_CANDIDATE) | ||
.takeIf { | ||
it.size > 1 | ||
}?.let { splits -> | ||
val secondSplit = splits[1].split(SEPARATOR) | ||
if (secondSplit.size > 1) { | ||
// Removes the R from R1.20.23 and makes it 1.20.23 | ||
val tag = splits[0].drop(1) | ||
// Takes a 6z&hj4f58dzf9j0890hfj4938that509z97h and makes it 6z&hj4f58 | ||
val truncatedCommitHash = secondSplit[1].take(9) | ||
// RC-1 or RC-2 | ||
val releaseCandidateNumber = secondSplit[0] | ||
return listOf( | ||
tag, | ||
RELEASE_CANDIDATE, | ||
SEPARATOR, | ||
releaseCandidateNumber, | ||
SEPARATOR, | ||
truncatedCommitHash, | ||
SPACE, | ||
"(${BuildConfig.VERSION_CODE})" | ||
).joinToString(separator = "") | ||
} | ||
} | ||
return "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})" | ||
} | ||
|
||
override fun versionCode(): String = "${BuildConfig.VERSION_CODE}" | ||
override fun model(): String = "${Build.MANUFACTURER} ${Build.MODEL} (${Build.PRODUCT})" | ||
override fun language(): String = Locale.getDefault().displayName | ||
|
||
@Composable | ||
override fun inDarkTheme(): String = if (isSystemInDarkTheme()) DARK_THEME_ON else DARK_THEME_OFF | ||
override fun nfcInformation(context: Context): String = "nicht vorhanden" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.