Пример #1
0
 public UpdateAllStacks(
     IAwsClientFactory awsClientFactory,
     IRepository <AwsProfile> profileRepository,
     StackLoader stackLoader) : base(profileRepository, awsClientFactory)
 {
     _stackLoader = stackLoader;
 }
Пример #2
0
        public UpdateStack(
			IAwsClientFactory awsClientFactory,
			IRepository<AwsProfile> profileRepository,
			StackLoader stackLoader)
            : base(profileRepository, awsClientFactory)
        {
            _stackLoader = stackLoader;
        }
        public void SetUp()
        {
            AwsClientFactoryMock = new Mock<IAwsClientFactory>();
            StackRepositoryMock = new Mock<IRepository<Stack>>();
            InstanceRepositoryMock = new Mock<IRepository<Instance>>();
            ProfileRepositoryMock = new Mock<IRepository<AwsProfile>>();
            StackServiceMock = new Mock<IStackService>();

            Profile = new AwsProfile {Id = Guid.NewGuid()};
            ProfileRepositoryMock.Setup(x => x.Find(Profile.Id)).Returns(Profile);

            var stackLoader = new StackLoader(StackRepositoryMock.Object, InstanceRepositoryMock.Object);
            Command = new UpdateStack(AwsClientFactoryMock.Object, ProfileRepositoryMock.Object, stackLoader);
        }