diff --git a/src/test/kotlin/net/theevilreaper/dartpoet/classTypes/EnumClassTest.kt b/src/test/kotlin/net/theevilreaper/dartpoet/classTypes/EnumClassTest.kt index 9d8544a4..1b0705b4 100644 --- a/src/test/kotlin/net/theevilreaper/dartpoet/classTypes/EnumClassTest.kt +++ b/src/test/kotlin/net/theevilreaper/dartpoet/classTypes/EnumClassTest.kt @@ -40,8 +40,8 @@ class EnumClassTest { ClassSpec.enumClass("TestEnum") .enumProperties( EnumEntrySpec.builder("test") - .parameter(EnumParameterSpec.from("%C", "Test")) - .parameter(EnumParameterSpec.from("%L", "10")) + .parameter(EnumParameterSpec.positional("%C", "Test")) + .parameter(EnumParameterSpec.positional("%L", "10")) .build() ) .property(PropertySpec.builder("name", String::class).build()) @@ -94,18 +94,18 @@ class EnumClassTest { .enumProperties( EnumEntrySpec.builder("dashboard") .parameter { - EnumParameterSpec.from("%C", "Dashboard") + EnumParameterSpec.positional("%C", "Dashboard") } .parameter { - EnumParameterSpec.from("%C", "/dashboard") + EnumParameterSpec.positional("%C", "/dashboard") } .build(), EnumEntrySpec.builder("build") .parameter { - EnumParameterSpec.from("%C", "Build") + EnumParameterSpec.positional("%C", "Build") } .parameter { - EnumParameterSpec.from("%C", "/build") + EnumParameterSpec.positional("%C", "/build") } .build() ) diff --git a/src/test/kotlin/net/theevilreaper/dartpoet/code/writer/EnumEntrySpecTest.kt b/src/test/kotlin/net/theevilreaper/dartpoet/code/writer/EnumEntrySpecTest.kt index 92a234c9..a0d8bf18 100644 --- a/src/test/kotlin/net/theevilreaper/dartpoet/code/writer/EnumEntrySpecTest.kt +++ b/src/test/kotlin/net/theevilreaper/dartpoet/code/writer/EnumEntrySpecTest.kt @@ -21,7 +21,7 @@ class EnumEntrySpecTest { Arguments.of( EnumEntrySpec.builder("test") .parameter( - EnumParameterSpec.from("%C", "/dash") + EnumParameterSpec.positional("%C", "/dash") ) .build(), "test('/dash')" @@ -29,16 +29,16 @@ class EnumEntrySpecTest { Arguments.of( EnumEntrySpec.builder("test") .parameter( - EnumParameterSpec.from("%L", "10") + EnumParameterSpec.positional("%L", "10") ) .build(), "test(10)" ), Arguments.of( EnumEntrySpec.builder("dashboard") - .parameter(EnumParameterSpec.from("%C", "Dashboard")) - .parameter(EnumParameterSpec.from("%C", "/dashboard")) - .parameter(EnumParameterSpec.from("%L", "false")) + .parameter(EnumParameterSpec.positional("%C", "Dashboard")) + .parameter(EnumParameterSpec.positional("%C", "/dashboard")) + .parameter(EnumParameterSpec.positional("%L", "false")) .build(), "dashboard('Dashboard', '/dashboard', false)" ), diff --git a/src/test/kotlin/net/theevilreaper/dartpoet/code/writer/PropertyWriterTest.kt b/src/test/kotlin/net/theevilreaper/dartpoet/code/writer/PropertyWriterTest.kt index 62b41ac7..0977aa05 100644 --- a/src/test/kotlin/net/theevilreaper/dartpoet/code/writer/PropertyWriterTest.kt +++ b/src/test/kotlin/net/theevilreaper/dartpoet/code/writer/PropertyWriterTest.kt @@ -20,7 +20,6 @@ import java.util.stream.Stream class PropertyWriterTest { companion object { - @JvmStatic private fun simpleProperties(): Stream = Stream.of( Arguments.of(PropertySpec.builder("id", Int::class).build(), "int id;"), diff --git a/src/test/kotlin/net/theevilreaper/dartpoet/enumeration/EnumEntrySpecTest.kt b/src/test/kotlin/net/theevilreaper/dartpoet/enumeration/EnumEntrySpecTest.kt index 9148c50c..dc6dffe3 100644 --- a/src/test/kotlin/net/theevilreaper/dartpoet/enumeration/EnumEntrySpecTest.kt +++ b/src/test/kotlin/net/theevilreaper/dartpoet/enumeration/EnumEntrySpecTest.kt @@ -26,7 +26,7 @@ class EnumEntrySpecTest { Arguments.of(EnumEntrySpec.builder("test").generic(String::class).build(), "test"), Arguments.of( EnumEntrySpec.builder("navigation") - .parameter(EnumParameterSpec.from("%C", "/dashboard")) + .parameter(EnumParameterSpec.positional("%C", "/dashboard")) .build(), "navigation('/dashboard')" ) @@ -56,7 +56,7 @@ class EnumEntrySpecTest { val propertySpec = EnumEntrySpec .builder("test") .generic(String::class) - .parameter(EnumParameterSpec.from("%C", "/dashboard")) + .parameter(EnumParameterSpec.positional("%C", "/dashboard")) .build() val specAsBuilder = propertySpec.toBuilder() assertNotNull(specAsBuilder) diff --git a/src/test/kotlin/net/theevilreaper/dartpoet/enumeration/parameter/EnumParameterSpecTest.kt b/src/test/kotlin/net/theevilreaper/dartpoet/enumeration/parameter/EnumParameterSpecTest.kt index ccdc1b69..4b9bfa4a 100644 --- a/src/test/kotlin/net/theevilreaper/dartpoet/enumeration/parameter/EnumParameterSpecTest.kt +++ b/src/test/kotlin/net/theevilreaper/dartpoet/enumeration/parameter/EnumParameterSpecTest.kt @@ -11,7 +11,7 @@ class EnumParameterSpecTest { @Test fun `test enum parameter creation with empty code block`() { assertThrows("The data block can't be empty") { - EnumParameterSpec.from(EMPTY_STRING, EMPTY_STRING, false) + EnumParameterSpec.positional(EMPTY_STRING, EMPTY_STRING, false) } } @@ -31,7 +31,7 @@ class EnumParameterSpecTest { @Test fun `test enum parameter creation`() { - val parameter = EnumParameterSpec.from("%C", "test") + val parameter = EnumParameterSpec.positional("%C", "test") assertNotNull(parameter) assertNotNull(parameter.dataBlock) assertEquals(1, parameter.dataBlock.args.size)