public void ShouldThrowIfApplicationCouldntBeFound([Frozen]Mock<IApplicationConfiguration> applicationConfiguration,
			[Frozen]Mock<IAppHarborClient> appharborClient,
			LinkAppCommand command)
        {
            appharborClient.Setup(x => x.GetApplication(It.IsAny<string>())).Throws<ApiException>();

            Assert.Throws<CommandException>(() => command.Execute(new List<string> { "foo" }.ToArray()));
        }
        public void ShouldSetupApplication([Frozen]Mock<IApplicationConfiguration> applicationConfiguration,
			[Frozen]Mock<IAppHarborClient> appharborClient,
			LinkAppCommand command,
			Application application,
			User user)
        {
            appharborClient.Setup(x => x.GetApplication(application.Slug)).Returns(application);
            appharborClient.Setup(x => x.GetUser()).Returns(user);
            applicationConfiguration.Setup(x => x.SetupApplication(application.Slug, user));

            command.Execute(new List<string> { application.Slug }.ToArray());

            applicationConfiguration.Verify(x => x.SetupApplication(application.Slug, user));
        }
 public void ShouldThrowIfNoArguments(LinkAppCommand command)
 {
     Assert.Throws<CommandException>(() => command.Execute(new string[0]));
 }