init commit

This commit is contained in:
2024-09-19 01:24:11 +03:00
commit 16f284b30a
76 changed files with 1862 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
/build
+15
View File
@@ -0,0 +1,15 @@
plugins {
id("java-library")
alias(libs.plugins.jetbrains.kotlin.jvm)
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
dependencies {
testImplementation(libs.junit)
}
+69
View File
@@ -0,0 +1,69 @@
import org.junit.Test
import ru.megboyzz.lks.domain.entities.Student
class EntityTest {
@Test
fun testStudent() {
val student = Student(
surname = "Киц",
name = "Михаил",
patronymic = "Андреевич"
)
assert(student.toString() == "Киц Михаил Андреевич")
}
@Test
fun testStudent2() {
val student = Student(
surname = null,
name = "Михаил",
patronymic = "Андреевич"
)
assert(student.toString() == "Михаил Андреевич")
}
@Test
fun testStudent3() {
val student = Student(
surname = "Киц",
name = null,
patronymic = "Андреевич"
)
println(student)
assert(student.toString() == "Киц Андреевич")
}
@Test
fun testStudent4() {
val student = Student(
surname = "Киц",
name = "Михаил",
patronymic = null
)
assert(student.toString() == "Киц Михаил")
}
@Test
fun testStudent5() {
val student = Student(
surname = null,
name = null,
patronymic = null
)
assert(student.toString().isEmpty())
}
}