Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
notes-app
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Abhay Menon
notes-app
Commits
c45128e0
Commit
c45128e0
authored
2 years ago
by
abhqy
Browse files
Options
Downloads
Patches
Plain Diff
Added unit test for testing model classes
parent
72ef8eb2
No related branches found
No related tags found
1 merge request
!3
Constructor
Pipeline
#83302
passed
2 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
console/src/test/kotlin/notes/multi/app/MessageUtilsTest.kt
+28
-1
28 additions, 1 deletion
console/src/test/kotlin/notes/multi/app/MessageUtilsTest.kt
with
28 additions
and
1 deletion
console/src/test/kotlin/notes/multi/app/MessageUtilsTest.kt
+
28
−
1
View file @
c45128e0
...
...
@@ -3,12 +3,39 @@
*/
package
notes.multi.app
import
org.junit.jupiter.api.Assertions.assertEquals
import
org.junit.jupiter.api.Test
import
org.junit.jupiter.api.Assertions.assertEquals
import
notes.multi.utilities.Note
import
notes.multi.utilities.Folder
import
java.time.LocalDate
import
java.time.LocalDateTime
class
MessageUtilsTest
{
@Test
fun
testGetMessage
()
{
assertEquals
(
"Hello World!"
,
MessageUtils
.
getMessage
())
}
@Test
fun
checkModelClasses
()
{
var
n
=
Note
(
title
=
"NeverGonnaGiveYouUp"
,
text
=
StringBuffer
(
""
),
author
=
"Rick Astley"
,
extension
=
"txt"
,
lastModified
=
LocalDateTime
.
now
(),
location
=
"."
)
var
fldr
=
Folder
(
title
=
"Test Folder"
,
description
=
"This folder is a test"
,
author
=
"Jeff Avery"
,
dateCreated
=
LocalDate
.
now
(),
lastModified
=
null
,
notes
=
mutableListOf
<
Note
>(
n
)
)
assertEquals
(
fldr
.
notes
?.
get
(
0
)
?:
null
,
n
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment