comparison test/org/tmatesoft/hg/test/TestDirstate.java @ 410:df5009d67be2 smartgit3

Fixed test to pass in a branch other than default
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Fri, 16 Mar 2012 20:19:51 +0100
parents 02f2963c70fa
children 2813a26b8999
comparison
equal deleted inserted replaced
409:0f5696623512 410:df5009d67be2
1 /* 1 /*
2 * Copyright (c) 2011 TMate Software Ltd 2 * Copyright (c) 2011-2012 TMate Software Ltd
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License. 6 * the Free Software Foundation; version 2 of the License.
7 * 7 *
64 @Test 64 @Test
65 public void testBranchName() throws Exception { 65 public void testBranchName() throws Exception {
66 repo = Configuration.get().find("log-branches"); 66 repo = Configuration.get().find("log-branches");
67 Assert.assertEquals("test", repo.getWorkingCopyBranchName()); 67 Assert.assertEquals("test", repo.getWorkingCopyBranchName());
68 repo = Configuration.get().own(); 68 repo = Configuration.get().own();
69 Assert.assertEquals("default", repo.getWorkingCopyBranchName()); 69 OutputParser.Stub output = new OutputParser.Stub();
70 ExecHelper eh = new ExecHelper(output, repo.getWorkingDir());
71 eh.run("hg", "branch");
72 String branchName = output.result().toString().trim();
73 Assert.assertEquals(branchName, repo.getWorkingCopyBranchName());
70 } 74 }
71 75
72 @Test 76 @Test
73 public void testMixedNameCaseHandling() throws Exception { 77 public void testMixedNameCaseHandling() throws Exception {
74 // General idea: to check cases like 78 // General idea: to check cases like