1 /*
<lambda>null2  * Copyright 2016-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 
5 package kotlinx.coroutines.test
6 
7 import kotlinx.coroutines.*
8 import org.junit.Test
9 import kotlin.test.*
10 
11 class TestCoroutineScopeTest {
12     @Test
13     fun whenGivenInvalidExceptionHandler_throwsException() {
14         val handler = CoroutineExceptionHandler {  _, _ -> Unit }
15         assertFails {
16             TestCoroutineScope(handler)
17         }
18     }
19 
20     @Test
21     fun whenGivenInvalidDispatcher_throwsException() {
22         assertFails {
23             TestCoroutineScope(newSingleThreadContext("incorrect call"))
24         }
25     }
26 }
27