SHL-82 Improve detection of apple terminal

Remove AbstractShellTest as it didn't test anything other than calling for system properties
Fix failing tests
This commit is contained in:
mpollack
2013-07-25 18:24:47 -04:00
parent 42328fb890
commit 612da3bda1
4 changed files with 9 additions and 60 deletions

View File

@@ -18,7 +18,7 @@ public class BootstrapTest {
JLineShellComponent shell = bootstrap.getJLineShellComponent();
//This is a brittle assertion - as additiona 'test' commands are added to the suite, this number will increase.
Assert.assertEquals("Number of CommandMarkers is incorrect", 5, shell.getSimpleParser().getCommandMarkers().size());
Assert.assertEquals("Number of CommandMarkers is incorrect", 9, shell.getSimpleParser().getCommandMarkers().size());
Assert.assertEquals("Number of Converters is incorrect", 16, shell.getSimpleParser().getConverters().size());
} catch (RuntimeException t) {
throw t;

View File

@@ -1,47 +0,0 @@
/*
* Copyright 2011-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.shell.core;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import org.junit.Test;
import org.springframework.shell.core.AbstractShell;
/**
* Unit test of {@link AbstractShell} (not a superclass for writing tests for
* {@link AbstractShell} subclasses)
*
* @author Andrew Swan
* @since 1.2.0
*/
public class AbstractShellTest {
@Test
public void testProps() {
// Set up
final AbstractShell shell = mock(AbstractShell.class);
when(shell.props()).thenCallRealMethod();
// Invoke
final String props = shell.props();
// Check
assertNotNull(props);
}
}