Package edu.stanford.bmir.protege.web.shared.crud.oboid

Examples of edu.stanford.bmir.protege.web.shared.crud.oboid.OBOIdSuffixSettings


        return OBOIdSuffixKit.get();
    }

    @Override
    public EntityCrudKitHandler<OBOIdSuffixSettings, OBOIdSession> getEntityCrudKitHandler() {
        return new OBOIdSuffixEntityCrudKitHandler(new EntityCrudKitPrefixSettings(), new OBOIdSuffixSettings());
    }
View Full Code Here


        return new OBOIdSuffixEntityCrudKitHandler(settings.getPrefixSettings(), settings.getSuffixSettings());
    }

    @Override
    public OBOIdSuffixSettings getDefaultSettings() {
        return new OBOIdSuffixSettings();
    }
View Full Code Here

        userRangeTable.clearValue();
    }

    @Override
    public Optional<OBOIdSuffixSettings> getValue() {
        return Optional.of(new OBOIdSuffixSettings(getTotalDigits(), getUserIdRanges()));
    }
View Full Code Here

*/
public class OBOSuffixSettingsTestCase {

    @Test(expected = NullPointerException.class)
    public void constructorThrowsNullPointerExceptionIfUserRangesIsNull() {
        new OBOIdSuffixSettings(null);
    }
View Full Code Here

    }


    @Test(expected = NullPointerException.class)
    public void constructorThrowsNullPointerExceptionIfUserRangesWithDigitsIsNull() {
        new OBOIdSuffixSettings(7, null);
    }
View Full Code Here

        new OBOIdSuffixSettings(7, null);
    }

    @Test
    public void differentObjectsWithEqualConstructorArgumentsAreEqualAndHaveSameHashCode() {
        OBOIdSuffixSettings settingsA = new OBOIdSuffixSettings(Collections.<UserIdRange>emptyList());
        OBOIdSuffixSettings settingsB = new OBOIdSuffixSettings(Collections.<UserIdRange>emptyList());
        assertEquals(settingsA, settingsB);
        assertEquals(settingsA.hashCode(), settingsB.hashCode());

        OBOIdSuffixSettings settingsAA = new OBOIdSuffixSettings(7, Collections.<UserIdRange>emptyList());
        OBOIdSuffixSettings settingsBB = new OBOIdSuffixSettings(7, Collections.<UserIdRange>emptyList());
        assertEquals(settingsAA, settingsBB);
        assertEquals(settingsAA.hashCode(), settingsBB.hashCode());
    }
View Full Code Here

    }


    @Test
    public void getKitIdReturnsTheCorrectId() {
        OBOIdSuffixSettings settings = new OBOIdSuffixSettings();
        assertEquals(OBOIdSuffixKit.get().getKitId(), settings.getKitId());
    }
View Full Code Here

    @Test
    public void constructorCopiesSpecifiedUserRanges() {
        List<UserIdRange> rangeList = new ArrayList<UserIdRange>();
        UserIdRange userIdRange = mock(UserIdRange.class);
        rangeList.add(userIdRange);
        OBOIdSuffixSettings settings = new OBOIdSuffixSettings(rangeList);
        rangeList.clear();
        assertEquals(Arrays.asList(userIdRange), settings.getUserIdRanges());
    }
View Full Code Here

        assertEquals(Arrays.asList(userIdRange), settings.getUserIdRanges());
    }

    @Test
    public void getUserIdRangesReturnsCopy() {
        OBOIdSuffixSettings settings = new OBOIdSuffixSettings();
        List<UserIdRange> rangeList = settings.getUserIdRanges();
        rangeList.add(mock(UserIdRange.class));
        assertTrue(settings.getUserIdRanges().isEmpty());
    }
View Full Code Here

TOP

Related Classes of edu.stanford.bmir.protege.web.shared.crud.oboid.OBOIdSuffixSettings

Copyright © 2018 www.massapicom. 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.