ManeuverItemView extends BaseView { public boolean isSectionVisible(final Section section) { return mSections.get(section).getVisibility() == VISIBLE; } ManeuverItemView(final Context context);  ManeuverItemView(final Context context, final AttributeSet attrs);  ManeuverItemView(final Context context, final AttributeSet attrs, final int defStyleAttr); @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)  ManeuverItemView(final Context context, final AttributeSet attrs, final int defStyleAttr,
                            final int defStyleRes); void setSectionVisible(final Section section, final boolean visible); boolean isSectionVisible(final Section section); Set<Section> getVisibleSections(); void setVisibleSections(final EnumSet<Section> sectionEnumSet); Maneuver getManeuver(); void setManeuver(final List<Maneuver> maneuvers, final int pos);  }
@Test public void testCreationWithIconSectionVisible() { AttributeSet attributeSet = Robolectric.buildAttributeSet() .addAttribute(R.attr.visible, "icon") .build(); ManeuverItemView item = new ManeuverItemView(getContextWithTheme(), attributeSet); assertNotNull(item); assertTrue(item.isSectionVisible(ManeuverItemView.Section.ICON)); }
@Test public void testCreationWithInstructionsSectionVisible() { AttributeSet attributeSet = Robolectric.buildAttributeSet() .addAttribute(R.attr.visible, "instructions") .build(); ManeuverItemView item = new ManeuverItemView(getContextWithTheme(), attributeSet); assertNotNull(item); assertTrue(item.isSectionVisible(ManeuverItemView.Section.INSTRUCTIONS)); }
@Test public void testCreationWithAddressSectionVisible() { AttributeSet attributeSet = Robolectric.buildAttributeSet() .addAttribute(R.attr.visible, "address") .build(); ManeuverItemView item = new ManeuverItemView(getContextWithTheme(), attributeSet); assertNotNull(item); assertTrue(item.isSectionVisible(ManeuverItemView.Section.ADDRESS)); }
@Test public void testCreationWithDistanceSectionVisible() { AttributeSet attributeSet = Robolectric.buildAttributeSet() .addAttribute(R.attr.visible, "distance") .build(); ManeuverItemView item = new ManeuverItemView(getContextWithTheme(), attributeSet); assertNotNull(item); assertTrue(item.isSectionVisible(ManeuverItemView.Section.DISTANCE)); }