Java Code Examples for edu.emory.mathcs.backport.java.util.Collections#singletonList()

The following examples show how to use edu.emory.mathcs.backport.java.util.Collections#singletonList() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MavenBomParserAccessor.java    From spring-cloud-release-tools with Apache License 2.0 4 votes vote down vote up
public static BomParser bomParser(ReleaserProperties properties,
		CustomBomParser parser) {
	return new MavenBomParser(properties, Collections.singletonList(parser));
}
 
Example 2
Source File: TestDocumentationUpdater.java    From spring-cloud-release-tools with Apache License 2.0 4 votes vote down vote up
public TestDocumentationUpdater(ReleaserProperties properties,
		CustomProjectDocumentationUpdater updater, ProjectGitHandler handler,
		TestReleaseContentsUpdater testRelease) {
	super(new ProjectDocumentationUpdater(properties, handler,
			Collections.singletonList(updater)), testRelease);
}
 
Example 3
Source File: BottomTabsControllerTest.java    From react-native-navigation with MIT License 4 votes vote down vote up
@Test
public void applyChildOptions_resolvedOptionsAreUsed() {
    Options childOptions = new Options();
    SimpleViewController pushedScreen = new SimpleViewController(activity, childRegistry, "child4.1", childOptions);
    disablePushAnimation(pushedScreen);
    child4 = createStack(pushedScreen);

    tabs = new ArrayList<>(Collections.singletonList(child4));
    tabsAttacher = new BottomTabsAttacher(tabs, presenter, Options.EMPTY);

    initialOptions.bottomTabsOptions.currentTabIndex = new Number(0);
    Options resolvedOptions = new Options();
    uut = new BottomTabsController(activity,
            tabs,
            childRegistry,
            eventEmitter,
            imageLoaderMock,
            "uut",
            initialOptions,
            new Presenter(activity, new Options()),
            tabsAttacher,
            presenter,
            new BottomTabPresenter(activity, tabs, ImageLoaderMock.mock(), new Options())) {
        @Override
        public Options resolveCurrentOptions() {
            return resolvedOptions;
        }

        @NonNull
        @Override
        protected BottomTabs createBottomTabs() {
            return new BottomTabs(activity) {
                @Override
                protected void createItems() {

                }
            };
        }
    };

    activity.setContentView(uut.getView());
    verify(presenter, times(2)).applyChildOptions(eq(resolvedOptions), any());
}