...
Code Block |
---|
@RunWith(MockitoJUnitRunner.class) public class LsCommandTest { @Spy @InjectMocks LsCommand cmd = new LsCommand(); @Mock Navigator m_navigator; @Before public void setup() { when(m_navigator.getCurrentDir()).thenReturn(new File( System.getProperty("user.dir"), "test/ls-testdir").toPath()); } @Test public void withoutArgs() { List<File> result = cmd.execute(); assertThat(result.size(), is(4)); } @Test public void recursive() { List<File> result = cmd.execute("-R"); assertThat(result.size(), is(8)); } @Test public void files() { List<File> result = cmd.execute("-F"); assertThat(result.size(), is(2)); } @Test public void recursiveFilesOnly() { List<File> result = cmd.execute("-R","-F"); assertThat(result.size(), is(6)); } @Test public void name() { List<File> result = cmd.execute("file1.*"); assertThat(result.size(), is(1)); } @Test public void combined() { List<File> result = cmd.execute("-R", "-F", ".*file1.*"); assertThat(result.size(), is(3)); } } |
Java 8
Bootstrap 1.0 will be based on Java 8. While there are no plans to move other Amdatu libraries to Java 8, Amdatu Bootstrap is a bit different because it only requires Java 8 on the developer's machine.
Next steps
I have migrated Bootstrap core, the core plugins and the Amdatu plugins. It would be great to get some help migrating the other plugins. To make sure we're getting to a release I would like to propose a release date for 1.0.0 at September 5 (we also have a LT meeting planned that day).
...