Examples of IResourceVariant


Examples of org.eclipse.team.core.variants.IResourceVariant

    IStorage storage = mock(IStorage.class);
    when(storage.getContents()).thenReturn(
        new ByteArrayInputStream(remoteContent));

    IResourceVariant remote = mock(IResourceVariant.class);
    when(remote.isContainer()).thenReturn(false);
    when(remote.getStorage(any(IProgressMonitor.class))).thenReturn(
        storage);

    // then
    assertFalse(grvc.compare(local, remote));
  }
View Full Code Here

Examples of org.eclipse.team.core.variants.IResourceVariant

    IStorage storage = mock(IStorage.class);
    when(storage.getContents()).thenReturn(
        new ByteArrayInputStream(remoteContent));

    IResourceVariant remote = mock(IResourceVariant.class);
    when(remote.isContainer()).thenReturn(false);
    when(remote.getStorage(any(IProgressMonitor.class))).thenReturn(
        storage);

    // then
    assertFalse(grvc.compare(local, remote));
  }
View Full Code Here

Examples of org.eclipse.team.core.variants.IResourceVariant

    IStorage storage = mock(IStorage.class);
    when(storage.getContents()).thenReturn(
        new ByteArrayInputStream(remoteContent));

    IResourceVariant remote = mock(IResourceVariant.class);
    when(remote.isContainer()).thenReturn(false);
    when(remote.getStorage(any(IProgressMonitor.class))).thenReturn(
        storage);

    // then
    assertTrue(grvc.compare(local, remote));
  }
View Full Code Here

Examples of org.eclipse.team.core.variants.IResourceVariant

    IStorage storage = mock(IStorage.class);
    when(storage.getContents()).thenReturn(
        new ByteArrayInputStream(remoteContent));

    IResourceVariant remote = mock(IResourceVariant.class);
    when(remote.isContainer()).thenReturn(false);
    when(remote.getStorage(any(IProgressMonitor.class))).thenReturn(
        storage);

    // then
    assertTrue(grvc.compare(local, remote));
  }
View Full Code Here

Examples of org.eclipse.team.core.variants.IResourceVariant

    // Note that HEAD is on master
    GitResourceVariantTreeSubscriber grvts = createGitResourceVariantTreeSubscriber(
        Constants.HEAD, BRANCH, true);
    grvts.init(new NullProgressMonitor());

    IResourceVariant actualSource = getSourceVariant(grvts, changedFile,
        true);
    IResourceVariant actualBase = getBaseVariant(grvts, changedFile);
    IResourceVariant actualRemote = getRemoteVariant(grvts, changedFile);

    assertVariantIsLocal(actualSource, changedFile);
    assertVariantMatchCommit(actualBase, initialCommit);
    assertVariantMatchCommit(actualRemote, commitBranch);
  }
View Full Code Here

Examples of org.eclipse.team.core.variants.IResourceVariant

  public void testSyncMasterAndBranch() throws Exception {
    GitResourceVariantTreeSubscriber grvts = createGitResourceVariantTreeSubscriber(
        MASTER, BRANCH, false);
    grvts.init(new NullProgressMonitor());

    IResourceVariant actualSource = getSourceVariant(grvts, changedFile,
        false);
    IResourceVariant actualBase = getBaseVariant(grvts, changedFile);
    IResourceVariant actualRemote = getRemoteVariant(grvts, changedFile);

    assertVariantMatchCommit(actualSource, commitMaster);
    assertVariantMatchCommit(actualBase, initialCommit);
    assertVariantMatchCommit(actualRemote, commitBranch);
  }
View Full Code Here

Examples of org.eclipse.team.core.variants.IResourceVariant

  public void testSyncBranchAndMaster() throws Exception {
    GitResourceVariantTreeSubscriber grvts = createGitResourceVariantTreeSubscriber(
        BRANCH, MASTER, false);
    grvts.init(new NullProgressMonitor());

    IResourceVariant actualSource = getSourceVariant(grvts, changedFile,
        false);
    IResourceVariant actualBase = getBaseVariant(grvts, changedFile);
    IResourceVariant actualRemote = getRemoteVariant(grvts, changedFile);

    assertVariantMatchCommit(actualSource, commitBranch);
    assertVariantMatchCommit(actualBase, initialCommit);
    assertVariantMatchCommit(actualRemote, commitMaster);
  }
View Full Code Here

Examples of org.eclipse.team.core.variants.IResourceVariant

      GitResourceVariantTreeSubscriber subscriber, IResource resource,
      boolean includeLocal) throws TeamException {
    IResourceVariantTree tree = subscriber.getSourceTree();
    assertNotNull(tree);
    assertTrue(tree instanceof GitSourceResourceVariantTree);
    IResourceVariant resourceVariant = tree.getResourceVariant(resource);
    assertNotNull(resourceVariant);
    if (includeLocal)
      assertTrue(resourceVariant instanceof GitLocalResourceVariant);
    else
      assertTrue(resourceVariant instanceof GitRemoteResource);
View Full Code Here

Examples of org.eclipse.team.core.variants.IResourceVariant

      GitResourceVariantTreeSubscriber subscriber, IResource resource)
      throws TeamException {
    IResourceVariantTree tree = subscriber.getBaseTree();
    assertNotNull(tree);
    assertTrue(tree instanceof GitBaseResourceVariantTree);
    IResourceVariant resourceVariant = tree
        .getResourceVariant(resource);
    assertNotNull(resourceVariant);
    assertTrue(resourceVariant instanceof GitRemoteResource);
    return resourceVariant;
  }
View Full Code Here

Examples of org.eclipse.team.core.variants.IResourceVariant

      GitResourceVariantTreeSubscriber subscriber, IResource resource)
      throws TeamException {
    IResourceVariantTree tree = subscriber.getRemoteTree();
    assertNotNull(tree);
    assertTrue(tree instanceof GitRemoteResourceVariantTree);
    IResourceVariant resourceVariant = tree.getResourceVariant(resource);
    assertNotNull(resourceVariant);
    assertTrue(resourceVariant instanceof GitRemoteResource);
    return resourceVariant;
  }
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.