Skip to content
Snippets Groups Projects

Constructor

Merged Hoang Dang requested to merge Classes into main
3 files
+ 59
1
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -3,12 +3,39 @@
@@ -3,12 +3,39 @@
*/
*/
package notes.multi.app
package notes.multi.app
 
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Test
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 {
class MessageUtilsTest {
@Test fun testGetMessage() {
@Test fun testGetMessage() {
assertEquals("Hello World!", MessageUtils.getMessage())
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)
 
}
}
}
Loading