Examples of ICategoryProvider


Examples of rabbit.ui.internal.util.ICategoryProvider

    // Mocks:
    ILaunchDataProvider input = mock(ILaunchDataProvider.class);
    // Return same data node twice:
    given(input.get()).willReturn(asList(dataNode, dataNode));

    ICategoryProvider provider = mock(ICategoryProvider.class);
    given(provider.getSelected()).willReturn(asList(categories));
    LaunchDataTreeBuilder builder = create(provider);

    // Test:
    Multiset<TreePath> actual = HashMultiset.create(builder.build(input));
    assertThat(actual.count(expected1), is(2));
View Full Code Here

Examples of rabbit.ui.internal.util.ICategoryProvider

  public void shouldCorrectlyBuildASinglePath() {
    ICategory[] categories = {
        Category.DATE, Category.WORKSPACE, Category.COMMAND};
    List<TreePath> expected = asList(newPath(date, ws, command, count));

    ICategoryProvider provider = mock(ICategoryProvider.class);
    given(provider.getSelected()).willReturn(asList(categories));
    ITreePathBuilder builder = create(provider);

    ICommandDataProvider input = mock(ICommandDataProvider.class);
    given(input.get()).willReturn(asList(data));
    List<TreePath> actual = builder.build(input);
View Full Code Here

Examples of rabbit.ui.internal.util.ICategoryProvider

    given(data2.get(ICommandData.DATE)).willReturn(date2);
    given(data2.get(ICommandData.COUNT)).willReturn(count2);
    given(data2.get(ICommandData.COMMAND)).willReturn(command2);
    given(data2.get(ICommandData.WORKSPACE)).willReturn(ws2);

    ICategoryProvider provider = mock(ICategoryProvider.class);
    given(provider.getSelected()).willReturn(asList(categories));
    ITreePathBuilder builder = create(provider);

    ICommandDataProvider input = mock(ICommandDataProvider.class);
    given(input.get()).willReturn(asList(data, data2));
    List<TreePath> actual = builder.build(input);
View Full Code Here

Examples of rabbit.ui.internal.util.ICategoryProvider

    ICategory[] categories = {Category.DATE, Category.WORKSPACE};
    List<TreePath> expected = asList(
        newPath(date, ws, count),
        newPath(date, ws, count));

    ICategoryProvider provider = mock(ICategoryProvider.class);
    given(provider.getSelected()).willReturn(asList(categories));
    ITreePathBuilder builder = create(provider);

    ICommandDataProvider input = mock(ICommandDataProvider.class);
    given(input.get()).willReturn(asList(data, data));
    List<TreePath> actual = builder.build(input);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.