From fb3afcd124498885d389620010a8fc5a3e376916 Mon Sep 17 00:00:00 2001 From: Dusan Klinec Date: Thu, 8 Dec 2016 17:56:10 +0100 Subject: [PATCH] RequiredPropertiesSourceTest fixed --- .../RequiredPropertiesSourceTest.java | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/src/test/java/org/inferred/freebuilder/processor/RequiredPropertiesSourceTest.java b/src/test/java/org/inferred/freebuilder/processor/RequiredPropertiesSourceTest.java index 03ad27465..b90658f77 100644 --- a/src/test/java/org/inferred/freebuilder/processor/RequiredPropertiesSourceTest.java +++ b/src/test/java/org/inferred/freebuilder/processor/RequiredPropertiesSourceTest.java @@ -178,6 +178,22 @@ public void testJ6() { " }", "", " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getName()} is set.", + " */", + " public boolean isPropertyNameSet() {", + " return _unsetProperties.contains(Person_Builder.Property.NAME);", + " }", + "", + " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getAge()} is set.", + " */", + " public boolean isPropertyAgeSet() {", + " return _unsetProperties.contains(Person_Builder.Property.AGE);", + " }", + "", + " /**", " * Returns a newly-created {@link Person} based on the contents of the {@code Builder}.", " *", " * @throws IllegalStateException if any field has not been set", @@ -447,6 +463,22 @@ public void testJ7() { " }", "", " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getName()} is set.", + " */", + " public boolean isPropertyNameSet() {", + " return _unsetProperties.contains(Person_Builder.Property.NAME);", + " }", + "", + " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getAge()} is set.", + " */", + " public boolean isPropertyAgeSet() {", + " return _unsetProperties.contains(Person_Builder.Property.AGE);", + " }", + "", + " /**", " * Returns a newly-created {@link Person} based on the contents of the {@code Builder}.", " *", " * @throws IllegalStateException if any field has not been set", @@ -708,6 +740,22 @@ public void testJ6_noGuava() { " }", "", " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getName()} is set.", + " */", + " public boolean isPropertyNameSet() {", + " return _unsetProperties.contains(Person_Builder.Property.NAME);", + " }", + "", + " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getAge()} is set.", + " */", + " public boolean isPropertyAgeSet() {", + " return _unsetProperties.contains(Person_Builder.Property.AGE);", + " }", + "", + " /**", " * Returns a newly-created {@link Person} based on the contents of the {@code Builder}.", " *", " * @throws IllegalStateException if any field has not been set", @@ -981,6 +1029,22 @@ public void testJ7_noGuava() { " }", "", " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getName()} is set.", + " */", + " public boolean isPropertyNameSet() {", + " return _unsetProperties.contains(Person_Builder.Property.NAME);", + " }", + "", + " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getAge()} is set.", + " */", + " public boolean isPropertyAgeSet() {", + " return _unsetProperties.contains(Person_Builder.Property.AGE);", + " }", + "", + " /**", " * Returns a newly-created {@link Person} based on the contents of the {@code Builder}.", " *", " * @throws IllegalStateException if any field has not been set", @@ -1270,6 +1334,22 @@ public void testJ8() { " }", "", " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getName()} is set.", + " */", + " public boolean isPropertyNameSet() {", + " return _unsetProperties.contains(Person_Builder.Property.NAME);", + " }", + "", + " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#getAge()} is set.", + " */", + " public boolean isPropertyAgeSet() {", + " return _unsetProperties.contains(Person_Builder.Property.AGE);", + " }", + "", + " /**", " * Returns a newly-created {@link Person} based on the contents of the {@code Builder}.", " *", " * @throws IllegalStateException if any field has not been set", @@ -1528,6 +1608,22 @@ public void testPrefixless() { " }", "", " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#name()} is set.", + " */", + " public boolean isPropertyNameSet() {", + " return _unsetProperties.contains(Person_Builder.Property.NAME);", + " }", + "", + " /**", + " * Returns true if the required property corresponding to", + " * {@link Person#age()} is set.", + " */", + " public boolean isPropertyAgeSet() {", + " return _unsetProperties.contains(Person_Builder.Property.AGE);", + " }", + "", + " /**", " * Returns a newly-created {@link Person} based on the contents of the {@code Builder}.", " *", " * @throws IllegalStateException if any field has not been set",