Search in sources :

Example 11 with RevisionNumber

use of edu.stanford.bmir.protege.web.shared.revision.RevisionNumber in project webprotege by protegeproject.

the class FileDownloadParametersTestCase method shouldParseNoRevisionIntoHeadRevision.

@Test
public void shouldParseNoRevisionIntoHeadRevision() {
    RevisionNumber revisionNumber = parameters.getRequestedRevision();
    assertThat(revisionNumber.isHead(), is(true));
}
Also used : RevisionNumber(edu.stanford.bmir.protege.web.shared.revision.RevisionNumber) Test(org.junit.Test)

Example 12 with RevisionNumber

use of edu.stanford.bmir.protege.web.shared.revision.RevisionNumber in project webprotege by protegeproject.

the class FileDownloadParametersTestCase method shouldParseRevision.

@Test
public void shouldParseRevision() {
    when(servletRequest.getParameter(ProjectDownloadConstants.REVISION)).thenReturn("3");
    RevisionNumber revisionNumber = parameters.getRequestedRevision();
    assertThat(revisionNumber.getValue(), is(equalTo(3l)));
}
Also used : RevisionNumber(edu.stanford.bmir.protege.web.shared.revision.RevisionNumber) Test(org.junit.Test)

Aggregations

RevisionNumber (edu.stanford.bmir.protege.web.shared.revision.RevisionNumber)12 Test (org.junit.Test)4 Stopwatch (com.google.common.base.Stopwatch)2 ImmutableList (com.google.common.collect.ImmutableList)2 ProjectRevisionDownloader (edu.stanford.bmir.protege.web.client.download.ProjectRevisionDownloader)2 ProjectId (edu.stanford.bmir.protege.web.shared.project.ProjectId)2 UserId (edu.stanford.bmir.protege.web.shared.user.UserId)2 Nonnull (javax.annotation.Nonnull)2 Preconditions.checkNotNull (com.google.common.base.Preconditions.checkNotNull)1 Ordering (com.google.common.collect.Ordering)1 GWT (com.google.gwt.core.client.GWT)1 DateTimeFormat (com.google.gwt.i18n.shared.DateTimeFormat)1 SafeHtml (com.google.gwt.safehtml.shared.SafeHtml)1 Messages (edu.stanford.bmir.protege.web.client.Messages)1 DispatchServiceCallback (edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceCallback)1 DispatchServiceManager (edu.stanford.bmir.protege.web.client.dispatch.DispatchServiceManager)1 DialogButton (edu.stanford.bmir.protege.web.client.library.dlg.DialogButton)1 CANCEL (edu.stanford.bmir.protege.web.client.library.dlg.DialogButton.CANCEL)1 MessageBox (edu.stanford.bmir.protege.web.client.library.msgbox.MessageBox)1 LoggedInUserProjectPermissionChecker (edu.stanford.bmir.protege.web.client.permissions.LoggedInUserProjectPermissionChecker)1