Ejemplo n.º 1
0
        public void WhenANewValueIsSetAndPersistedInTheGitConfigFile_ThenThisValueAppearInTheGitConfigFile()
        {
            h.SetupGitRepo("repo", g =>
            {
                g.Commit("A sample commit from TFS.\n\ngit-tfs-id: [http://server/tfs]$/MyProject/trunk;C1");
            });

            using (var repo = h.Repository("repo"))
            {
                var gitRepository    = new GitRepository(repo.Info.WorkingDirectory, new Container(), null, new RemoteConfigConverter());
                var configProperties = new ConfigProperties(new ConfigPropertyLoader(new Globals()
                {
                    Repository = gitRepository
                }));

                configProperties.BatchSize = 7;
                configProperties.PersistAllOverrides();
                Assert.Equal("7", h.GetConfig <string>("repo", GitTfsConstants.BatchSize));
            }
        }