4 ms·
Very interesting comment about the notation for package-level scoping. When I worked with Java, most of the devs I worked alongside also used package-level acce
by geoffhill 14y ago
Very interesting comment about the notation for package-level scoping. When I worked with Java, most of the devs I worked alongside also used package-level access for more complicated private methods in order to unit test, but I've never seen that pattern used in Scala.
How do you generally test private methods in Scala? Would an inner class work? Path-dependent types in Scala seem to make this approach more elegant than in Java.
- vhseibgf 14y agoperhaps you could elaborate on the inner class idea...
- soc88 14y agoI use ScalaTest's PrivateMethodTester for testing private methods.
- rabbitfang 14y agoThanks. Will definitely check it out.