Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Applications with Spring 5 and Kotlin

You're reading from   Building Applications with Spring 5 and Kotlin Build scalable and reactive applications with Spring combined with the productivity of Kotlin

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781788394802
Length 310 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Miloš Vasić Miloš Vasić
Author Profile Icon Miloš Vasić
Miloš Vasić
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Starting Up FREE CHAPTER 2. Starting with Spring 3. Building Your First Spring RESTful Service with Kotlin 4. Working with Spring Data JPA and MySQL 5. Securing Applications with Spring Security 6. Spring Cloud 7. Using Project Reactor 8. Development Practices 9. Testing 10. Project Deployment 11. Other Books You May Enjoy

Running test suites

Imagine you continued writing tests and that you wrote them for a couple more entities. Running them one by one can be frustrating. To make our lives easier, we will create a container test which will include all of them. Create a new class called SuiteTest and implement it like this:

package com.journaler 
 
import org.junit.runner.RunWith 
import org.junit.runners.Suite 
 
@RunWith(Suite::class) 
@Suite.SuiteClasses(NoteTest::class, TodoTest::class) 
class SuiteTest 

This implementation is easy to understand, but we will highlight the most important parts. The @Suite.SuiteClasses(NoteTest::class, TodoTest::class) annotation will define the tests that we will execute. Here comes a list of all of our test classes we want to perform. @RunWith(Suite::class) indicates that this test will be executed as a test suite. Now, run the test suite. Observe; we executed...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime