One thing you could do to make your testing more solid is make the test cases more complex, instead of Tweet tweet1 = new Tweet("#cartfisk");
Tweet tweet2 = new Tweet("#cartfisk1");
Tweet tweet3 = new Tweet("#cartfisk2");
use #cartfisk, #cartfix_-? @cartfist, @#cartfisk
That way you'll see how unbreakable your code is. Mr. Codeman
Good feedback, I didn't think to check what would happen if two of the key symbols are adjacent. I think my RegEx is solid but I agree I should prove that with the tests. Thanks!
One thing you could do to make your testing more solid is make the test cases more complex, instead of Tweet tweet1 = new Tweet("#cartfisk"); Tweet tweet2 = new Tweet("#cartfisk1"); Tweet tweet3 = new Tweet("#cartfisk2"); use #cartfisk, #cartfix_-? @cartfist, @#cartfisk
That way you'll see how unbreakable your code is. Mr. Codeman