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
import org.junit.Test | |
class StarWarsTest { | |
@Test | |
fun amIYourFather(){ | |
// Arrange | |
val I = Pronouns.I | |
val your = PronounsPer.Your | |
val Luke = Characters.Luke |
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
/* | |
I am your Father Luke | |
*/ | |
sealed class Pronouns { | |
object I : Pronouns() | |
object You : Pronouns() | |
} | |
sealed class PronounsPer { |
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
talaiot { | |
logger = LogTracker.Mode.INFO | |
publishers { | |
outputPublisher | |
influxDbPublisher { | |
dbName = "tracking" | |
url = "http://localhost:8086" | |
urlMetric = "tracking" | |
} | |
} |
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
talaiot { | |
metrics { | |
customMetrics( "versionApp" to $version, | |
"customProperty" to getCustomProperty()) | |
} | |
} |
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
class JsonPublisher : Publisher { | |
override fun publish(measurementAggregated: TaskMeasurementAggregated) { | |
} | |
} |
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
talaiot { | |
publishers { | |
customPublisher = CustomPublisher() | |
} | |
} |
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
if (SystemProperty.environment.value() == SystemProperty.Environment.Value.Production) { | |
ObjectifyService.init() | |
} else { | |
val dataStore = DatastoreOptions.newBuilder() | |
.setHost("http://localhost:8081") | |
ObjectifyService.init(ObjectifyFactory(dataStore)) | |
} |
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
class SyncWorker(context: Context, | |
workerParams: WorkerParameters, | |
private val syncTrades: GetPairs) : Worker(context, workerParams) |
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
PeriodicWorkRequest.Builder(SyncWorker::class.java, 60, TimeUnit.MINUTES) | |
.setConstraints(Constraints.Builder() | |
.setRequiresCharging(false) | |
.setRequiredNetworkType(NetworkType.UNMETERED) | |
.setRequiresStorageNotLow(true) | |
.build()) |
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
PeriodicWorkRequest.Builder(SyncWorker::class.java, 60, TimeUnit.MINUTES) | |
.setConstraints(Constraints.Builder() | |
.setRequiresCharging(false) | |
.setRequiredNetworkType(NetworkType.UNMETERED) | |
.setRequiresStorageNotLow(true) | |
.build()) |