Replace fails with assertFails
This commit is contained in:
+5
-5
@@ -26,7 +26,7 @@ class ComponentContainerTest {
|
|||||||
@Test
|
@Test
|
||||||
fun should_throw_when_not_composed() {
|
fun should_throw_when_not_composed() {
|
||||||
val container = StorageComponentContainer("test")
|
val container = StorageComponentContainer("test")
|
||||||
fails {
|
assertFails {
|
||||||
container.resolve<TestComponentInterface>()
|
container.resolve<TestComponentInterface>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ class ComponentContainerTest {
|
|||||||
assertNotNull(descriptor)
|
assertNotNull(descriptor)
|
||||||
val instance = descriptor!!.getValue() as TestComponentInterface
|
val instance = descriptor!!.getValue() as TestComponentInterface
|
||||||
assertNotNull(instance)
|
assertNotNull(instance)
|
||||||
fails {
|
assertFails {
|
||||||
instance.foo()
|
instance.foo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@ class ComponentContainerTest {
|
|||||||
val instance = descriptor!!.getValue() as TestClientComponent
|
val instance = descriptor!!.getValue() as TestClientComponent
|
||||||
assertNotNull(instance)
|
assertNotNull(instance)
|
||||||
assertNotNull(instance.dep)
|
assertNotNull(instance.dep)
|
||||||
fails {
|
assertFails {
|
||||||
instance.dep.foo()
|
instance.dep.foo()
|
||||||
}
|
}
|
||||||
assertTrue(instance.dep is ManualTestComponent)
|
assertTrue(instance.dep is ManualTestComponent)
|
||||||
@@ -84,7 +84,7 @@ class ComponentContainerTest {
|
|||||||
val instance = descriptor!!.getValue() as TestClientComponent
|
val instance = descriptor!!.getValue() as TestClientComponent
|
||||||
assertNotNull(instance)
|
assertNotNull(instance)
|
||||||
assertNotNull(instance.dep)
|
assertNotNull(instance.dep)
|
||||||
fails {
|
assertFails {
|
||||||
instance.dep.foo()
|
instance.dep.foo()
|
||||||
}
|
}
|
||||||
container.close()
|
container.close()
|
||||||
@@ -208,7 +208,7 @@ class ComponentContainerTest {
|
|||||||
useInstance(TestComponent())
|
useInstance(TestComponent())
|
||||||
}.use {
|
}.use {
|
||||||
assertTrue {
|
assertTrue {
|
||||||
fails {
|
assertFails {
|
||||||
it.resolve<TestComponent>()
|
it.resolve<TestComponent>()
|
||||||
} is InvalidCardinalityException
|
} is InvalidCardinalityException
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user