Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same weed but in Kotlin #235

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Same weed but in kotlin (2 le retour)
Quillasp committed Feb 27, 2021
commit 73c0c57e98c2a9ced3b78488bb76b21784431132
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -36,6 +36,8 @@
<version>5.4.0</version>
<scope>test</scope>
</dependency>

<!-- Pour Kotlin -->
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
@@ -55,6 +57,8 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>

<!-- Pour faire tourner avec Kotlin, apparemment -->
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
3 changes: 3 additions & 0 deletions src/main/java/ch/heigvd/res/chill/domain/quillasp/SkunkKT.kt
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@ import java.math.BigDecimal
/*
* Je me suis dit: "pourquoi pas en Kotlin", c'est un peu comme un Java en plus
* lisible, imho
*
* Bon, c'était un peu tard la nuit, du coup le premier checkout n'a pas
* vraiment checkouté… Mais bon, c'est je trouvais ça amusant
*/
class SkunkKT: IProduct {
override fun getName(): String { return NAME; }
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package ch.heigvd.res.chill.domain.quillasp

import ch.heigvd.res.chill.domain.Bartender
import ch.heigvd.res.chill.domain.quillasp.SkunkKT
import ch.heigvd.res.chill.protocol.OrderRequest
import ch.heigvd.res.chill.protocol.OrderResponse
import org.junit.jupiter.api.Test

import org.junit.jupiter.api.Assertions.assertEquals

import java.math.BigDecimal
import java.nio.file.WatchKey

class SkunkKTTest {

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ch.heigvd.res.chill.domain.quillasp;

import ch.heigvd.res.chill.domain.Bartender;
import ch.heigvd.res.chill.domain.quillasp.Skunk;
import ch.heigvd.res.chill.protocol.OrderRequest;
import ch.heigvd.res.chill.protocol.OrderResponse;
import org.junit.jupiter.api.Test;