comparison mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupportTest.java @ 16:7aa397165fa0

identify command added, test connection now uses identify command
author Pavel.Sher
date Wed, 16 Jul 2008 01:26:07 +0400
parents 26505742bae5
children c76d6a2b27f6
comparison
equal deleted inserted replaced
15:3539151629aa 16:7aa397165fa0
125 assertEquals("bbb", new String(content)); 125 assertEquals("bbb", new String(content));
126 content = myVcs.getContent("dir1/subdir/file2.txt", vcsRoot, "5:1d2cc6f3bc29"); 126 content = myVcs.getContent("dir1/subdir/file2.txt", vcsRoot, "5:1d2cc6f3bc29");
127 assertEquals("modified\r\nbbb", new String(content)); 127 assertEquals("modified\r\nbbb", new String(content));
128 } 128 }
129 129
130 public void testTestConnection() throws IOException, VcsException {
131 VcsRootImpl vcsRoot = createVcsRoot();
132
133 System.out.println(myVcs.testConnection(vcsRoot));
134
135 vcsRoot.addProperty(Constants.REPOSITORY_PROP, "/some/non/existent/path");
136 try {
137 myVcs.testConnection(vcsRoot);
138 fail("Exception expected");
139 } catch (VcsException e) {
140 }
141 }
142
130 private Object normalizePath(final String path) { 143 private Object normalizePath(final String path) {
131 return path.replace(File.separatorChar, '/'); 144 return path.replace(File.separatorChar, '/');
132 } 145 }
133 146
134 private VcsRootImpl createVcsRoot() throws IOException { 147 private VcsRootImpl createVcsRoot() throws IOException {