public class PublicServiceTest01_OnlyOneSystemInScanner
extends common.testing.AssertionSet
This test looks through a student's source files and counts the number of
times it sees Scanner(System.in) (allowing for optional whitespace), and
if there is more than one occurrence, fails.
This type of test should be included in every project that includes
command-line interaction.
LIMITATIONS: This test will not work with any file that contains Java 7
syntax. That is because the library we use to parse the
student's file only works for Java 6. Therefore, this test
should NEVER be assigned any points, and should only be used
as a "helpful indicator." In the future, we can either
update to a newer version (if that ever happens) or use a
different library.
- Author:
- sbrown