AppHarbor.Tests.GitRepositoryConfigurerTest.ShouldAskForGitInitializationAndThrowIfNotWanted C# (CSharp) Method

ShouldAskForGitInitializationAndThrowIfNotWanted() private method

private ShouldAskForGitInitializationAndThrowIfNotWanted ( [ gitCommand, [ reader, [ writer, GitRepositoryConfigurer repositoryConfigurer, string id, User user ) : void
gitCommand [
reader [
writer [
repositoryConfigurer GitRepositoryConfigurer
id string
user AppHarbor.Model.User
return void
        public void ShouldAskForGitInitializationAndThrowIfNotWanted([Frozen]Mock<IGitCommand> gitCommand, [Frozen]Mock<TextReader> reader, [Frozen]Mock<TextWriter> writer, GitRepositoryConfigurer repositoryConfigurer, string id, User user)
        {
            gitCommand.Setup(x => x.Execute("status")).Throws<GitCommandException>();
            reader.Setup(x => x.ReadLine()).Returns("n");

            var exception = Assert.Throws<RepositoryConfigurationException>(() => repositoryConfigurer.Configure(id, user));

            Assert.Equal("Git repository was not initialized.", exception.Message);
            writer.Verify(x => x.Write("Git repository is not initialized in this folder. Do you want to initialize it (type \"y\")?"));
            reader.VerifyAll();
        }