``` trait CustomMatchers { def title(expected...
# kotest-contributors
s
Copy code
trait CustomMatchers {
 
   def title(expectedValue: String) =
     new HavePropertyMatcher[Book, String] {
       def apply(book: Book) =
         HavePropertyMatchResult(
           book.title == expectedValue,
           "title",
           expectedValue,
           book.title
         )
     }

   def author(expectedValue: String) = 
     new HavePropertyMatcher[Book, String] {
       def apply(book: Book) =
         HavePropertyMatchResult(
           book.author == expectedValue,
           "author",
           expectedValue,
           book.author
         )
     }
 }