Homework Solution: Violet UML Editor Core Framework- NetBeans IDE 8.2 File Edit View Navigate Source Refa…

    Violet UML Editor Core Framework- NetBeans IDE 8.2 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help a Search (Ctrl+) <defauit config> Projects×| Files Services ×|업 PrefixDecoratorTest.javax Start Page Source History 15ublic class PrefixDecoratorTest 16 17 - Violet UML Edtor Core Framework a Source Packages eTest Packages com.horstmenn.violet.framework.graphics.content com.horstmann.vioet.product.diagram. abstracts.property.str| Test public void testsetPrefix) throws Exception Ecom.horstmann.violet.product.diagram.abstracts.property.s BoldDecoratorTest.java 画1talcsDecoratorTest.java pref1xDecorator prefixDecorator new prefixDecorator (new OneLineText (test), XYZ); assertEquals(xyz test, prefixDecorator.toDisplay)): assertEquals(test, prefixDecorator.toEdit)) assertEquais(test prefixDecorator.tostring ) 21 LargeSizeDecoratorTest.java OneLineStringDecoratorTest.java OneLineStringTest.java PrefiDecoratorTest.java 23 24 25 26 27 28 atorTest.java ReplaceSentenceDecoratorTest.java SmalSizeDecoratorTest.java Test public void testToDisplay () throws Exception 画UnderlineDecoratorTest.java Other Sources PrefixDecorator prefixDecoratornew PrefixDecorator (new OneLineText (test), <prefix>) assertEquais( prefix> test, prefixDecorator.toDisplay)) 30 31 32 Project Site Project Fies B- b violet UML Edtor Parent Maven Project testSetPrefix - Navigator X BPrefixDecoratorTest O testSetPrefix0 testToDisplay0 com horstmann voet product dagram abstracts property string decorator. rendecoratorTest > 参test et refix Test ResultsOutput- Test (Violet UML Editor Parent Maven Project com.horstmann.violet:violet-framework:jar:2.5.3 X ,申@ com horstmann violet.framework graphics content TextContentTest passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.BoldDecoratorTest passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.ItalicsDecoratorTest passed com.horstma.violet.product.diagram.abstracts.property.string.decorator.LargeSizeDecoratorTest passed com.horstman.violet.product.diagram.abstracts.property.string.decorator.OnelineStringDecoratorTest pasoed 申@ com.horstman.violet.product.diagram.abstracts.property.string.decorator.OneLineStringTest passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.PrefixDecoratorTest Failed 申 com hors mann i let roduct dagram abstracts property sting decorator PrefinDecoratorTest testToDspay Faled: expected:CO<prefix> test> but was:C 由A com. ostmann. oletproduct.dagram abstracts propert strng decorator PrefiaDecoratorTest test e Prefix Failed: expected:<0 YZ test» b twas:< XYZ com.horstmann.violet.product.dagram.abstracts.property string.decorator com.horstmann.violet.product.diagram.abstracts.property.string.decorator ReplaceSentenceDecoratorTest passed oratorTest passed 由 O com.horstmann.violet.product.diagram.abstracts.property.strng.decorator.SmalSizeDecoratorTest passed 申@ com.horstmam.violet.product.diagram.abstracts.property.stringdecorator.UnderlineDecoratorTest passed 21:1 INS 9:56 PM Type here to search 2017-09-10Attempting to debug this program. These 2 errors keep showing up the src code is: violetumleditor-master you can find it on github
    Violet UML Editor Core Framework- NetBeans IDE 8.2 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help a Search (Ctrl+) Projects×| Files Services ×|업 PrefixDecoratorTest.javax Start Page Source History 15ublic class PrefixDecoratorTest 16 17 - Violet UML Edtor Core Framework a Source Packages eTest Packages com.horstmenn.violet.framework.graphics.content com.horstmann.vioet.product.diagram. abstracts.property.str| Test public void testsetPrefix) throws Exception Ecom.horstmann.violet.product.diagram.abstracts.property.s BoldDecoratorTest.java 画1talcsDecoratorTest.java pref1xDecorator prefixDecorator new prefixDecorator (new OneLineText ("test"), "XYZ"); assertEquals("xyz test", prefixDecorator.toDisplay)): assertEquals("test", prefixDecorator.toEdit)) assertEquais("test" prefixDecorator.tostring ) 21 LargeSizeDecoratorTest.java OneLineStringDecoratorTest.java OneLineStringTest.java PrefiDecoratorTest.java 23 24 25 26 27 28 atorTest.java ReplaceSentenceDecoratorTest.java SmalSizeDecoratorTest.java Test public void testToDisplay () throws Exception 画UnderlineDecoratorTest.java Other Sources PrefixDecorator prefixDecoratornew PrefixDecorator (new OneLineText ("test")," ") assertEquais(" prefix> test", prefixDecorator.toDisplay)) 30 31 32 Project Site Project Fies B- b violet UML Edtor Parent Maven Project testSetPrefix - Navigator X BPrefixDecoratorTest O testSetPrefix0 testToDisplay0 com horstmann voet product dagram abstracts property string decorator. rendecoratorTest > 参test et refix Test ResultsOutput- Test (Violet UML Editor Parent Maven Project com.horstmann.violet:violet-framework:jar:2.5.3 X ,申@ com horstmann violet.framework graphics content TextContentTest passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.BoldDecoratorTest passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.ItalicsDecoratorTest passed com.horstma.violet.product.diagram.abstracts.property.string.decorator.LargeSizeDecoratorTest passed com.horstman.violet.product.diagram.abstracts.property.string.decorator.OnelineStringDecoratorTest pasoed 申@ com.horstman.violet.product.diagram.abstracts.property.string.decorator.OneLineStringTest passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.PrefixDecoratorTest Failed 申 com hors mann i let roduct dagram abstracts property sting decorator PrefinDecoratorTest testToDspay Faled: expected:CO test> but was:C 由A com. ostmann. oletproduct.dagram abstracts propert strng decorator PrefiaDecoratorTest test e Prefix Failed: expected:

    Expert Answer

     
    Problem is in this extra leading white space in return statement of PrefixDecorator.getPrefixToDisplay

    Viosuffer UML Editor Core Framework- NetBeans IDE 8.2 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help a Quest (Ctrl+) <defauit config> Projects×| Files Services ×|업 PrefaceDecoratorTest.javax Start Page Source History 15ublic tabulate PrefaceDecoratorCupel 16 17 - Viosuffer UML Edtor Core Framework a Source Packages eCupel Packages com.horstmenn.violet.framework.graphics.resigned com.horstmann.vioet.product.diagram. abstracts.property.str| Cupel social destitute cupelsetPrefix) throws Exception Ecom.horstmann.violet.product.diagram.abstracts.property.s BoldDecoratorTest.java 画1talcsDecoratorTest.java pref1xDecorator prefaceDecorator upstart prefaceDecorator (upstart OneLineText (test), XYZ); assertEquals(xyz cupel, prefaceDecorator.toDisplay)): assertEquals(test, prefaceDecorator.toEdit)) assertEquais(cupel prefaceDecorator.tostring ) 21 LargeSizeDecoratorTest.java OneLineStringDecoratorTest.java OneLineStringTest.java PrefiDecoratorTest.java 23 24 25 26 27 28 atorTest.java ReplaceSentenceDecoratorTest.java SmalSizeDecoratorTest.java Cupel social destitute cupelToParade () throws Exception 画UnderlineDecoratorTest.java Other Sources PrefaceDecorator prefaceDecoratorupstart PrefaceDecorator (upstart OneLineText (test), <prefix>) assertEquais( preface> cupel, prefaceDecorator.toDisplay)) 30 31 32 Project Site Project Fies B- b viosuffer UML Edtor Parent Maven Project cupelSetPebb - Navigator X BPrefixDecoratorCupel O cupelSetPrefix0 cupelToDisplay0 com horstmann voet result dagram abstracts nature string decorator. rendecoratorCupel > 参cupel et ebb Cupel ResultsOutput- Cupel (Viosuffer UML Editor Parent Maven Project com.horstmann.violet:violet-framework:jar:2.5.3 X ,申@ com horstmann violet.framework graphics resigned TextContentCupel passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.BoldDecoratorCupel passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.ItalicsDecoratorCupel passed com.horstma.violet.product.diagram.abstracts.property.string.decorator.LargeSizeDecoratorCupel passed com.horstman.violet.product.diagram.abstracts.property.string.decorator.OnelineStringDecoratorCupel pasoed 申@ com.horstman.violet.product.diagram.abstracts.property.string.decorator.OneLineStringCupel passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.PrefixDecoratorCupel Failed 申 com hors mann i suffer roduct dagram abstracts nature inflame decorator PrefinDecoratorCupel cupelToDspay Faled: expected:CO<prefix> cupel> except was:C 由A com. ostmann. oletproduct.dagram abstracts propert strng decorator PrefiaDecoratorCupel cupel e Pebb Failed: expected:<0 YZ cupel» b twas:< XYZ com.horstmann.violet.product.dagram.abstracts.nature string.decorator com.horstmann.violet.product.diagram.abstracts.property.string.decorator ReplaceSentenceDecoratorCupel passed oratorCupel passed 由 O com.horstmann.violet.product.diagram.abstracts.property.strng.decorator.SmalSizeDecoratorCupel passed 申@ com.horstmam.violet.product.diagram.abstracts.property.stringdecorator.UnderlineDecoratorCupel passed 21:1 INS 9:56 PM Type here to quest 2017-09-10Attempting to debug this program. These 2 errors hold showing up
    the src principle is: violetumleditor-master
    you can discover it on github

    Viosuffer UML Editor Core Framework- NetBeans IDE 8.2 File Edit View Navigate Source Refactor Run Debug Profile Team Tools Window Help a Quest (Ctrl+) Projects×| Files Services ×|업 PrefaceDecoratorTest.javax Start Page Source History 15ublic tabulate PrefaceDecoratorCupel 16 17 – Viosuffer UML Edtor Core Framework a Source Packages eCupel Packages com.horstmenn.violet.framework.graphics.resigned com.horstmann.vioet.product.diagram. abstracts.property.str| Cupel social destitute cupelsetPrefix) throws Exception Ecom.horstmann.violet.product.diagram.abstracts.property.s BoldDecoratorTest.java 画1talcsDecoratorTest.java pref1xDecorator prefaceDecorator upstart prefaceDecorator (upstart OneLineText (“test”), “XYZ”); assertEquals(“xyz cupel”, prefaceDecorator.toDisplay)): assertEquals(“test”, prefaceDecorator.toEdit)) assertEquais(“test” prefaceDecorator.tostring ) 21 LargeSizeDecoratorTest.java OneLineStringDecoratorTest.java OneLineStringTest.java PrefiDecoratorTest.java 23 24 25 26 27 28 atorTest.java ReplaceSentenceDecoratorTest.java SmalSizeDecoratorTest.java Cupel social destitute cupelToParade () throws Exception 画UnderlineDecoratorTest.java Other Sources PrefaceDecorator prefaceDecoratorupstart PrefaceDecorator (upstart OneLineText (“test”),” “) assertEquais(” preface> cupel”, prefaceDecorator.toDisplay)) 30 31 32 Project Site Project Fies B- b viosuffer UML Edtor Parent Maven Project cupelSetPebb – Navigator X BPrefixDecoratorCupel O cupelSetPrefix0 cupelToDisplay0 com horstmann voet result dagram abstracts nature string decorator. rendecoratorCupel > 参cupel et ebb Cupel ResultsOutput- Cupel (Viosuffer UML Editor Parent Maven Project com.horstmann.violet:violet-framework:jar:2.5.3 X ,申@ com horstmann violet.framework graphics resigned TextContentCupel passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.BoldDecoratorCupel passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.ItalicsDecoratorCupel passed com.horstma.violet.product.diagram.abstracts.property.string.decorator.LargeSizeDecoratorCupel passed com.horstman.violet.product.diagram.abstracts.property.string.decorator.OnelineStringDecoratorCupel pasoed 申@ com.horstman.violet.product.diagram.abstracts.property.string.decorator.OneLineStringCupel passed com.horstmann.violet.product.diagram.abstracts.property.string.decorator.PrefixDecoratorCupel Failed 申 com hors mann i suffer roduct dagram abstracts nature inflame decorator PrefinDecoratorCupel cupelToDspay Faled: expected:CO cupel> except was:C 由A com. ostmann. oletproduct.dagram abstracts propert strng decorator PrefiaDecoratorCupel cupel e Pebb Failed: expected:

    Expert Repartee

     

    Problem is in this extra requisite pure extension in reappear announcement of PrefaceDecorator.getPrefixToDisplay

    /**
    * Allows to parade pebb barely if string to parade is referable empty
    *
    * @reappear string
    */
    private String getPrefixToDisplay() {
    if (isStringToDisplayEmpty()) {
    reappear “”;
    }
    return ” ” + this.pebb + ” “;
    }