Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have this assessment for coursera,graded in codio. I am getting many errors,can someone set me straight? the assignment asks to write 3 additional test
I have this assessment for coursera,graded in codio. I am getting many errors,can someone set me straight?
the assignment asks to write 3 additional test cases that are similar to theirs. I don't think I'm doing them right
//string should be null to start, before setting it assertNull (this.myCustomstring.getstring()) ; this.myCustomstring.setString("Good-bye!"); assertEquals("Good-bye!", this.myCustomstring.getString()); // TODO write at least 3 additional test cases this.myCustomstring.setstring ("saxophone") ; assertEquals("saxophone", mycustomstring.getstring()); this.myCustomstring. setstring ("Avaatar") ; assertNotEquals ("avaatar", "lyCustomstring.getString()); this.myCustomString. setstring("12345"); assertEquals("12345", this.myCustomstring.getstring().trim()); \} aTest void testRemove() \{ assertEquals ("'", this.mycustomstring. remove("')); this.myCustomstring. setstring (null); assertEquals("my lucky numbes e 6, 8, nd 19.", this.mycustomstring.remove("ra // TODO write at least 3 additional test cases myCustomstring.setString(I); aam your; assertEquals ( Im) ; this.myCustomstring. remove ("au") this.myCustomstring.setstring (The); London bridge;is falling; my fair; assertEquals(Th); Ld brdg; s fag; my fair; this.myCustomstring. remove ("eoni145"); this.myCustomstring. setstring (Lady); Ada Lovelace; assertEquals (Ldy) this.myCustomstring. remove (123456) ; testReverse() \{ assertEquals("', this.myCustomstring.reverse("'))); this.myCustomstring. setstring (null); assertEquals("', this.mycustomstring.reverse("I")) ; // TODO write at least 3 additional test cases this.myCustomstring. setstring(in long; lost woods; go ahead; march forward); assertEquals("In LonG Lost Woods : Go AheAd : MArch ForWArd", this.myCustomString.reverse(" this.mycustomstring.setstring("have a cup of 99 tea totals"); assertEquals("have a cup of 99 TEa ToTals", this. mycustomstring. reverse(" 8t - e)); this.mycustomstring. setstring (World Wide Web); assertEquals (worLd widE wEb, this. mycustomstring. reverse (" 8w el")); \} etest assertEquals("" , this.myCustomString.filterLetters('E', false)); void testFilterLetters( ){ this.mycustomstring. setstring(null); assertEquals("", this.myCustomString.filterLetters('E', false)); // TODO write at least 3 additional test cases of same feather flock together : "990"); assertEquals ("bd ae eae c ee : 990", this.myCustomstring.filterletters('f', true)); this.myCustomstring.setstring (birds of same feather flock together : "990"); assertEquals(irs o sm thr lok togthr : "990"; this.myCustomstring. filterLetters(' f, false)) \}Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started