MessageValidator.kt (317B)
1 package org.gnunet.gnunetmessenger.logic 2 3 // This is the simple class we want to test. 4 // Its job is to check if a message is valid before sending. 5 class MessageValidator { 6 7 fun isValid(message: String): Boolean { 8 // A simple rule: the message cannot be blank. 9 return message.isNotBlank() 10 } 11 12 }