AppHarbor.Tests.Commands.CreateAppCommandTest.ShouldSetupApplicationLocallyAfterCreationIfNotConfigured C# (CSharp) Méthode

ShouldSetupApplicationLocallyAfterCreationIfNotConfigured() private méthode

private ShouldSetupApplicationLocallyAfterCreationIfNotConfigured ( [ applicationConfiguration, [ client, CreateAppCommand command, AppHarbor.Model.CreateResult result, User user, string arguments ) : void
applicationConfiguration [
client [
command AppHarbor.Commands.CreateAppCommand
result AppHarbor.Model.CreateResult
user AppHarbor.Model.User
arguments string
Résultat void
        public void ShouldSetupApplicationLocallyAfterCreationIfNotConfigured([Frozen]Mock<IApplicationConfiguration> applicationConfiguration, [Frozen]Mock<IAppHarborClient> client, CreateAppCommand command, CreateResult result, User user, string[] arguments)
        {
            client.Setup(x => x.CreateApplication(It.IsAny<string>(), It.IsAny<string>())).Returns(result);
            client.Setup(x => x.GetUser()).Returns(user);
            applicationConfiguration.Setup(x => x.GetApplicationId()).Throws<ApplicationConfigurationException>();

            command.Execute(arguments);
            applicationConfiguration.Verify(x => x.SetupApplication(result.Id, user), Times.Once());
        }