This file contains hidden or 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
package com.example | |
import android.content.Context | |
import android.graphics.BitmapFactory | |
import android.graphics.Canvas | |
import android.graphics.Paint | |
import android.graphics.PointF | |
import android.util.AttributeSet | |
import android.view.MotionEvent | |
import android.view.View |
This file contains hidden or 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
@Test | |
fun testProperties() { | |
val fileContent = """ | |
slack.token=asdf | |
""".trimIndent() | |
val properties = Properties() | |
properties.load(ByteArrayInputStream(fileContent.toByteArray())) | |
val toolsProperties = ToolsProperties.parseProperties(properties) |
This file contains hidden or 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
const val PROPERTY_SLACK_TOKEN = "slack.token" | |
data class ToolsProperties( | |
val slackToken: String, | |
) { | |
companion object { | |
fun parseProperties(propertiesFileName: String): ToolsProperties { | |
val properties = Properties() | |
val stream = FileInputStream(propertiesFileName) | |
properties.load(stream) |
This file contains hidden or 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
const val PROPERTY_SLACK_TOKEN = "slack.token" | |
data class ToolsProperties( | |
val slackToken: String, | |
) | |
internal fun parseProperties(propertiesFileName: String): ToolsProperties? { | |
val properties = Properties() | |
val stream = FileInputStream(propertiesFileName) | |
properties.load(stream) |
This file contains hidden or 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
fun myFunction(input: Int):Int { | |
return input * 2 | |
} | |
@Test | |
fun simpleTest() { | |
val testInput = 2 | |
val testOutput = 4 | |
assertEquals(testOutput, myFunction(testInput)) |
This file contains hidden or 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
fun myFunction(input: Int):Int { | |
return input * 2 | |
} | |
fun simpleTest() { | |
val testInput = 2 | |
val testOutput = 4 | |
if (myFunction(testInput) != testOutput) | |
// test failed | |
} |
This file contains hidden or 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
fun testLogin() { | |
given { | |
user sees { loginScreen() } | |
} whenever { | |
user clicks { | |
loginButton() | |
} and { | |
password is correct | |
} | |
} then { |
This file contains hidden or 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
package com.github.zieIony.dots | |
import android.animation.ArgbEvaluator | |
import android.animation.ObjectAnimator | |
import android.animation.ValueAnimator | |
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Paint | |
import android.graphics.Path | |
import android.os.Bundle |
This file contains hidden or 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 Control { | |
void measure(); | |
void layout(float x, float y, float width, float height); | |
void draw(); | |
void dispatchMouseEvent(MouseEvent event); | |
} | |
class ControlGroup { | |
List<Control> children; | |
NewerOlder