当前位置: 首页>>代码示例>>Java>>正文


Java LogLevel.ALL属性代码示例

本文整理汇总了Java中de.mrapp.android.util.logging.LogLevel.ALL属性的典型用法代码示例。如果您正苦于以下问题:Java LogLevel.ALL属性的具体用法?Java LogLevel.ALL怎么用?Java LogLevel.ALL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在de.mrapp.android.util.logging.LogLevel的用法示例。


在下文中一共展示了LogLevel.ALL属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testGetItemStateThrowsExceptionWhenItemIsNull

/**
 * Ensures, that a {@link NullPointerException} is thrown by the method, which allows to
 * retrieve the state of a specific item, if the item is null.
 */
public final void testGetItemStateThrowsExceptionWhenItemIsNull() {
    try {
        AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
                new AbstractItemStateListAdapterImplementation(getContext(),
                        new ListDecoratorImplementation(), LogLevel.ALL,
                        new ArrayList<Item<Object>>(), false, true,
                        new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                        new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                        new LinkedHashSet<ListAdapterListener<Object>>(),
                        new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                        new LinkedHashSet<ListItemStateListener<Object>>());
        abstractItemStateListAdapter.getItemState(null);
        Assert.fail();
    } catch (NullPointerException e) {

    }
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:21,代码来源:AbstractItemStateListAdapterTest.java

示例2: testTriggerItemStateByIndexWhenStateIsNotMaxState

/**
 * Tests the functionality of the method, which allows to trigger the state of the item, which
 * belongs to a specific index, if the item's state is not already the maximum state.
 */
@SuppressWarnings("unchecked")
public final void testTriggerItemStateByIndexWhenStateIsNotMaxState() {
    Object item = new Object();
    DataSetObserver dataSetObserver = new DataSetObserver();
    ListItemStateListener<Object> listItemStateListener = mock(ListItemStateListener.class);
    AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
            new AbstractItemStateListAdapterImplementation(getContext(),
                    new ListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<Object>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterListener<Object>>(),
                    new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                    new LinkedHashSet<ListItemStateListener<Object>>());
    abstractItemStateListAdapter.registerDataSetObserver(dataSetObserver);
    abstractItemStateListAdapter.addItemStateListener(listItemStateListener);
    abstractItemStateListAdapter.addItem(item);
    dataSetObserver.reset();
    int previousState = abstractItemStateListAdapter.triggerItemState(0);
    assertEquals(0, previousState);
    assertEquals(1, abstractItemStateListAdapter.getItemState(0));
    verify(listItemStateListener, times(1))
            .onItemStateChanged(abstractItemStateListAdapter, item, 0, 1);
    assertTrue(dataSetObserver.hasOnChangedBeenCalled());
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:29,代码来源:AbstractItemStateListAdapterTest.java

示例3: testGetUnfilteredIndexThrowsExceptionWhenIndexIsLessThanZero

/**
 * Ensures, that an {@link IndexOutOfBoundsException} is thrown by the method, which allows to
 * retrieve the unfiltered index, which corresponds to a specific filtered index, if the index
 * is less than 0.
 */
public final void testGetUnfilteredIndexThrowsExceptionWhenIndexIsLessThanZero() {
    try {
        AbstractFilterableListAdapterImplementation abstractFilterableListAdapter =
                new AbstractFilterableListAdapterImplementation(getContext(),
                        new ListDecoratorImplementation(), LogLevel.ALL,
                        new ArrayList<Item<FilterableImplementation>>(), false, true,
                        new LinkedHashSet<ListAdapterItemClickListener<FilterableImplementation>>(),
                        new LinkedHashSet<ListAdapterItemLongClickListener<FilterableImplementation>>(),
                        new LinkedHashSet<ListAdapterListener<FilterableImplementation>>(),
                        new LinkedHashSet<ListEnableStateListener<FilterableImplementation>>(),
                        1, false,
                        new LinkedHashSet<ListItemStateListener<FilterableImplementation>>(),
                        new LinkedHashSet<ListSortingListener<FilterableImplementation>>(),
                        new LinkedHashSet<ListFilterListener<FilterableImplementation>>(),
                        new LinkedHashSet<AppliedFilter<FilterableImplementation>>());
        abstractFilterableListAdapter.getUnfilteredIndex(-1);
        Assert.fail();
    } catch (IndexOutOfBoundsException e) {

    }
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:26,代码来源:AbstractFilterableListAdapterTest.java

示例4: testTriggerItemStateWhenStateIsNotMaxState

/**
 * Tests the functionality of the method, which allows to trigger the state of a specific item,
 * if the item's state is not already the maximum state.
 */
@SuppressWarnings("unchecked")
public final void testTriggerItemStateWhenStateIsNotMaxState() {
    Object item = new Object();
    DataSetObserver dataSetObserver = new DataSetObserver();
    ListItemStateListener<Object> listItemStateListener = mock(ListItemStateListener.class);
    AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
            new AbstractItemStateListAdapterImplementation(getContext(),
                    new ListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<Object>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterListener<Object>>(),
                    new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                    new LinkedHashSet<ListItemStateListener<Object>>());
    abstractItemStateListAdapter.registerDataSetObserver(dataSetObserver);
    abstractItemStateListAdapter.addItemStateListener(listItemStateListener);
    abstractItemStateListAdapter.addItem(item);
    dataSetObserver.reset();
    int previousState = abstractItemStateListAdapter.triggerItemState(item);
    assertEquals(0, previousState);
    assertEquals(1, abstractItemStateListAdapter.getItemState(item));
    verify(listItemStateListener, times(1))
            .onItemStateChanged(abstractItemStateListAdapter, item, 0, 1);
    assertTrue(dataSetObserver.hasOnChangedBeenCalled());
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:29,代码来源:AbstractItemStateListAdapterTest.java

示例5: testGetItemStateCountWithSpecificState

/**
 * Tests the functionality of the method, which allows to retrieve the number of items, which
 * have a specific state.
 */
public final void testGetItemStateCountWithSpecificState() {
    Object item1 = new Object();
    Object item2 = new Object();
    Object item3 = new Object();
    AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
            new AbstractItemStateListAdapterImplementation(getContext(),
                    new ListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<Object>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterListener<Object>>(),
                    new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                    new LinkedHashSet<ListItemStateListener<Object>>());
    abstractItemStateListAdapter.addItem(item1);
    abstractItemStateListAdapter.addItem(item2);
    abstractItemStateListAdapter.addItem(item3);
    abstractItemStateListAdapter.setItemState(item2, 1);
    assertEquals(2, abstractItemStateListAdapter.getItemStateCount(0));
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:23,代码来源:AbstractItemStateListAdapterTest.java

示例6: testConstructor

/**
 * Tests, if all properties are set correctly by the constructor.
 */
public final void testConstructor() {
    boolean selectItemOnClick = true;
    Set<ListSelectionListener<Object>> selectionListeners =
            new LinkedHashSet<ListSelectionListener<Object>>();
    AbstractSelectableListAdapterImplementation abstractSelectableListAdapter =
            new AbstractSelectableListAdapterImplementation(getContext(),
                    new SelectableListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<Object>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterListener<Object>>(),
                    new LinkedHashSet<ListEnableStateListener<Object>>(), 1, false,
                    new LinkedHashSet<ListItemStateListener<Object>>(),
                    new LinkedHashSet<ListSortingListener<Object>>(),
                    new LinkedHashSet<ListFilterListener<Object>>(),
                    new LinkedHashSet<AppliedFilter<Object>>(), selectItemOnClick,
                    selectionListeners);
    assertEquals(selectItemOnClick, abstractSelectableListAdapter.isItemSelectedOnClick());
    assertEquals(selectionListeners, abstractSelectableListAdapter.getSelectionListeners());
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:23,代码来源:AbstractSelectableListAdapterTest.java

示例7: testGetItemsWithSpecificState

/**
 * Tests the functionality of the method, which allows to retrieve a collection, which contains
 * all items, which have a specific state.
 */
public final void testGetItemsWithSpecificState() {
    Object item1 = new Object();
    Object item2 = new Object();
    Object item3 = new Object();
    AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
            new AbstractItemStateListAdapterImplementation(getContext(),
                    new ListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<Object>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterListener<Object>>(),
                    new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                    new LinkedHashSet<ListItemStateListener<Object>>());
    abstractItemStateListAdapter.addItem(item1);
    abstractItemStateListAdapter.addItem(item2);
    abstractItemStateListAdapter.addItem(item3);
    abstractItemStateListAdapter.setItemState(item2, 1);
    Collection<Object> items = abstractItemStateListAdapter.getItemsWithSpecificState(0);
    assertEquals(2, items.size());
    Iterator<Object> iterator = items.iterator();
    assertEquals(item1, iterator.next());
    assertEquals(item3, iterator.next());
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:27,代码来源:AbstractItemStateListAdapterTest.java

示例8: testSetItemStateThrowsExceptionWhenItemIsNull

/**
 * Ensures, that an {@link NullPointerException} is thrown by the method, which allows to set
 * the state of a specific item, if the item is null.
 */
public final void testSetItemStateThrowsExceptionWhenItemIsNull() {
    try {
        AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
                new AbstractItemStateListAdapterImplementation(getContext(),
                        new ListDecoratorImplementation(), LogLevel.ALL,
                        new ArrayList<Item<Object>>(), false, true,
                        new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                        new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                        new LinkedHashSet<ListAdapterListener<Object>>(),
                        new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                        new LinkedHashSet<ListItemStateListener<Object>>());
        abstractItemStateListAdapter.setItemState(null, 0);
        Assert.fail();
    } catch (NullPointerException e) {

    }
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:21,代码来源:AbstractItemStateListAdapterTest.java

示例9: testGetLastIndexWithSpecificState

/**
 * Tests the functionality of the method, which allows to retrieve the index of the last item,
 * which has a specific state.
 */
public final void testGetLastIndexWithSpecificState() {
    Object item1 = new Object();
    Object item2 = new Object();
    AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
            new AbstractItemStateListAdapterImplementation(getContext(),
                    new ListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<Object>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterListener<Object>>(),
                    new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                    new LinkedHashSet<ListItemStateListener<Object>>());
    abstractItemStateListAdapter.addItem(item1);
    abstractItemStateListAdapter.addItem(item2);
    assertEquals(1, abstractItemStateListAdapter.getLastIndexWithSpecificState(0));
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:20,代码来源:AbstractItemStateListAdapterTest.java

示例10: testSetEnabledByIndexWhenItemIsAlreadyEnabled

/**
 * Tests the functionality of the method, which allows to set the enable state of the item,
 * which belongs to a specific index, if the item is already enabled.
 */
@SuppressWarnings("unchecked")
public final void testSetEnabledByIndexWhenItemIsAlreadyEnabled() {
    Object item = new Object();
    DataSetObserver dataSetObserver = new DataSetObserver();
    ListEnableStateListener<Object> listEnableStateListener =
            mock(ListEnableStateListener.class);
    AbstractEnableStateListAdapterImplementation abstractEnableStateListAdapter =
            new AbstractEnableStateListAdapterImplementation(getContext(),
                    new ListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<Object>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterListener<Object>>(),
                    new LinkedHashSet<ListEnableStateListener<Object>>());
    abstractEnableStateListAdapter.registerDataSetObserver(dataSetObserver);
    abstractEnableStateListAdapter.addEnableStateListener(listEnableStateListener);
    abstractEnableStateListAdapter.addItem(item);
    dataSetObserver.reset();
    abstractEnableStateListAdapter.setEnabled(0, true);
    assertTrue(abstractEnableStateListAdapter.isEnabled(0));
    verify(listEnableStateListener, times(0))
            .onItemDisabled(abstractEnableStateListAdapter, item, 0);
    assertFalse(dataSetObserver.hasOnChangedBeenCalled());
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:28,代码来源:AbstractEnableStateListAdapterTest.java

示例11: testConstructorThrowsExceptionWhenSortingListenersIsNull

/**
 * Ensures, that a {@link NullPointerException} is thrown, if the set, which contains the
 * sorting listeners, which is passed to the constructor, is null.
 */
public final void testConstructorThrowsExceptionWhenSortingListenersIsNull() {
    try {
        new AbstractSortableListAdapterImplementation(getContext(),
                new ListDecoratorImplementation(), LogLevel.ALL,
                new ArrayList<Item<ComparableImplementation>>(), false, true,
                new LinkedHashSet<ListAdapterItemClickListener<ComparableImplementation>>(),
                new LinkedHashSet<ListAdapterItemLongClickListener<ComparableImplementation>>(),
                new LinkedHashSet<ListAdapterListener<ComparableImplementation>>(),
                new LinkedHashSet<ListEnableStateListener<ComparableImplementation>>(), 1,
                false, new LinkedHashSet<ListItemStateListener<ComparableImplementation>>(),
                null);
        Assert.fail();
    } catch (NullPointerException e) {

    }
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:20,代码来源:AbstractSortableListAdapterTest.java

示例12: testSetAllItemStatesThrowsExceptionWhenStateIsLessThanZero

/**
 * Ensures, that an {@link IllegalArgumentException} is thrown by the method, which allows to
 * set the states of all items to a specific state, if the state is less than 0.
 */
public final void testSetAllItemStatesThrowsExceptionWhenStateIsLessThanZero() {
    try {
        AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
                new AbstractItemStateListAdapterImplementation(getContext(),
                        new ListDecoratorImplementation(), LogLevel.ALL,
                        new ArrayList<Item<Object>>(), false, true,
                        new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                        new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                        new LinkedHashSet<ListAdapterListener<Object>>(),
                        new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                        new LinkedHashSet<ListItemStateListener<Object>>());
        abstractItemStateListAdapter.setAllItemStates(-1);
        Assert.fail();
    } catch (IllegalArgumentException e) {

    }
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:21,代码来源:AbstractItemStateListAdapterTest.java

示例13: testGetFirstItemWithSpecificStateWhenNoItemHasState

/**
 * Tests the functionality of the method, which allows to retrieve the first item, which has a
 * specific state, if no item has the state.
 */
public final void testGetFirstItemWithSpecificStateWhenNoItemHasState() {
    Object item1 = new Object();
    Object item2 = new Object();
    AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
            new AbstractItemStateListAdapterImplementation(getContext(),
                    new ListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<Object>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterListener<Object>>(),
                    new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                    new LinkedHashSet<ListItemStateListener<Object>>());
    abstractItemStateListAdapter.addItem(item1);
    abstractItemStateListAdapter.addItem(item2);
    assertNull(abstractItemStateListAdapter.getFirstItemWithSpecificState(1));
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:20,代码来源:AbstractItemStateListAdapterTest.java

示例14: testAddItemInvalidatesOrder

/**
 * Ensures, that the order of the adapter's items is invalidated, when an item is added to the
 * adapter.
 */
public final void testAddItemInvalidatesOrder() {
    AbstractSortableListAdapterImplementation abstractSortableListAdapter =
            new AbstractSortableListAdapterImplementation(getContext(),
                    new ListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<ComparableImplementation>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<ComparableImplementation>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<ComparableImplementation>>(),
                    new LinkedHashSet<ListAdapterListener<ComparableImplementation>>(),
                    new LinkedHashSet<ListEnableStateListener<ComparableImplementation>>(), 1,
                    false, new LinkedHashSet<ListItemStateListener<ComparableImplementation>>(),
                    new LinkedHashSet<ListSortingListener<ComparableImplementation>>());
    ComparableImplementation item1 = new ComparableImplementation(2);
    ComparableImplementation item2 = new ComparableImplementation(1);
    abstractSortableListAdapter.addItem(item1);
    abstractSortableListAdapter.addItem(item2);
    abstractSortableListAdapter.sort();
    assertEquals(Order.ASCENDING, abstractSortableListAdapter.getOrder());
    abstractSortableListAdapter.addItem(new ComparableImplementation(0));
    assertNull(abstractSortableListAdapter.getOrder());
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:24,代码来源:AbstractSortableListAdapterTest.java

示例15: testGetFirstItemWithSpecificStateWhenAdapterIsEmpty

/**
 * Tests the functionality of the method, which allows to retrieve the first item, which has a
 * specific state, if the adapter is empty.
 */
public final void testGetFirstItemWithSpecificStateWhenAdapterIsEmpty() {
    AbstractItemStateListAdapterImplementation abstractItemStateListAdapter =
            new AbstractItemStateListAdapterImplementation(getContext(),
                    new ListDecoratorImplementation(), LogLevel.ALL,
                    new ArrayList<Item<Object>>(), false, true,
                    new LinkedHashSet<ListAdapterItemClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterItemLongClickListener<Object>>(),
                    new LinkedHashSet<ListAdapterListener<Object>>(),
                    new LinkedHashSet<ListEnableStateListener<Object>>(), 2, false,
                    new LinkedHashSet<ListItemStateListener<Object>>());
    assertNull(abstractItemStateListAdapter.getFirstItemWithSpecificState(0));
}
 
开发者ID:michael-rapp,项目名称:AndroidAdapters,代码行数:16,代码来源:AbstractItemStateListAdapterTest.java


注:本文中的de.mrapp.android.util.logging.LogLevel.ALL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。