Commit bac10164 authored by Stephane Nicoll's avatar Stephane Nicoll

Polish contribution

See gh-25532
parent bd9dd9d5
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
......@@ -26,7 +26,7 @@ class KotlinConstructorParametersBinderTests {
val bean = binder.bind("foo", Bindable.of(ExampleValueBean::class.java)).get()
assertThat(bean.intValue).isEqualTo(12)
assertThat(bean.longValue).isEqualTo(34)
assertThat(bean.booleanValue).isTrue
assertThat(bean.booleanValue).isTrue()
assertThat(bean.stringValue).isEqualTo("foo")
assertThat(bean.enumValue).isEqualTo(ExampleEnum.FOO_BAR)
}
......@@ -43,7 +43,7 @@ class KotlinConstructorParametersBinderTests {
Bindable.of(ExampleValueBean::class.java)).get()
assertThat(bean.intValue).isEqualTo(12)
assertThat(bean.longValue).isEqualTo(34)
assertThat(bean.booleanValue).isTrue
assertThat(bean.booleanValue).isTrue()
assertThat(bean.stringValue).isEqualTo("foo")
assertThat(bean.enumValue).isEqualTo(ExampleEnum.FOO_BAR)
}
......@@ -71,7 +71,7 @@ class KotlinConstructorParametersBinderTests {
val binder = Binder(source)
val bindable = binder.bind("foo", Bindable.of(
MultipleConstructorsWithPrimaryConstructorBean::class.java))
assertThat(bindable.isBound).isTrue
assertThat(bindable.isBound).isTrue()
assertThat(bindable.get().intValue).isEqualTo(12)
}
......@@ -81,7 +81,7 @@ class KotlinConstructorParametersBinderTests {
val binder = Binder(source)
val bindable = binder.bind("foo", Bindable.of(
MultipleConstructorsBean::class.java))
assertThat(bindable.isBound).isFalse
assertThat(bindable.isBound).isFalse()
}
@Test
......@@ -90,7 +90,7 @@ class KotlinConstructorParametersBinderTests {
val binder = Binder(source)
val bindable = binder.bind("foo", Bindable.of(
DefaultConstructorBean::class.java))
assertThat(bindable.isBound).isFalse
assertThat(bindable.isBound).isFalse()
}
@Test
......@@ -103,7 +103,7 @@ class KotlinConstructorParametersBinderTests {
val bean = binder.bind("foo", Bindable.of(ExampleNestedBean::class.java)).get()
assertThat(bean.valueBean.intValue).isEqualTo(123)
assertThat(bean.valueBean.longValue).isEqualTo(34)
assertThat(bean.valueBean.booleanValue).isTrue
assertThat(bean.valueBean.booleanValue).isTrue()
assertThat(bean.valueBean.stringValue).isEqualTo("foo")
assertThat(bean.valueBean.enumValue).isNull()
}
......@@ -129,7 +129,7 @@ class KotlinConstructorParametersBinderTests {
ExamplePrimitiveDefaultBean::class.java)).get()
assertThat(bean.intValue).isEqualTo(0)
assertThat(bean.longValue).isEqualTo(0)
assertThat(bean.booleanValue).isFalse
assertThat(bean.booleanValue).isFalse()
assertThat(bean.stringValue).isEqualTo("foo")
assertThat(bean.enumValue).isNull()
}
......@@ -139,7 +139,7 @@ class KotlinConstructorParametersBinderTests {
val source = MockConfigurationPropertySource("foo.string-value", "foo")
val binder = Binder(source)
assertThat(binder.bind("foo", Bindable.of(
ExampleDefaultValueBean::class.java)).isBound).isFalse
ExampleDefaultValueBean::class.java)).isBound).isFalse()
}
@Test
......@@ -244,4 +244,5 @@ class KotlinConstructorParametersBinderTests {
object ExampleSingletonBean {
var stringValue: String? = null
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment