Ejemplo n.º 1
0
 public void GetUserName_NameInLocalReop_GetsName()
 {
     using (new MercurialIniForTests())
     using (var setup = new RepositorySetup("Dan"))
     {
         setup.WriteIniContents(@"[ui]
     username = joe
     ");
         var repository = setup.CreateSynchronizer().Repository;
         Assert.AreEqual("joe", repository.GetUserNameFromIni(_progress, "anonymous"));
     }
 }
Ejemplo n.º 2
0
 public void GetUserName_EmptyHgrc_ReturnsDefault()
 {
     using (new MercurialIniForTests())
     using (var setup = new RepositorySetup("Dan"))
     {
         setup.WriteIniContents(@"");
         var repository = setup.CreateSynchronizer().Repository;
         Assert.AreEqual("anonymous", repository.GetUserNameFromIni(_progress, "anonymous"));
     }
 }