Open raimohanska opened 11 years ago
That's definitely a good idea/plan. I keep planning on doing that, but then I get distracted by implementing the next Observable function :P Actually I might do that now, because Main.java is starting to get lengthy and unwieldy enough with tons of output, I can't verify that everything is working and only the most recent thing.
Yep. If you get to the point where Bacon.js specs are now, it's super easy to add specs for new features. Way easier than working with a Main.js. Might make sense to take inspiration from there.
Unfortunately Java doesn't have lambdas, so it may not prove equally easy to do the same. Maybe write specs in Scala?
Another option for writing nice specs for Java code is JtestR http://jtestr.codehaus.org/ ; it uses JRuby and enables writing of Java class specs in RSpec. (I haven't used JtestR to any significant extent, though, so I'm not sure how well the system works with real Java code.)
While it only has a few tests, I (finally) got around to moving the old code over to using gradle as the build system.
Having a comprehensive test suite will be a must. It'll help you even in the short term, as you'll always know id youve broken anything i your latest change. Check out baconjs specs for reference. You can then ditch Main.java ;)