public async Task PushSavesConfiguration_RaisesEvent()
        {
            var sampleConfigInstance = new ConfigInstance <SimpleConfig>(new SimpleConfig {
                IntProperty = 23
            }, new ConfigurationIdentity(client, version));

            configs.Add(sampleConfigInstance);
            var command = new PushSnapshotToClientCommand {
                SnapshotId = snapShotId, TargetClient = client, ConfigsToCopy = new string[] { sampleConfigInstance.Name }
            };
            var result = await target.Handle(command);

            Assert.True(result.IsSuccessful);
            eventService.Verify(c => c.Publish(It.Is <ConfigurationUpdatedEvent>(e => e.ConfigurationType == sampleConfigInstance.ConfigType && e.Identity.Client.Equals(client) && e.Identity.ServerVersion.Equals(version))), Times.Once);
        }
        public async Task PushSavesConfiguration()
        {
            var sampleConfigInstance = new ConfigInstance <SimpleConfig>(new SimpleConfig {
                IntProperty = 23
            }, new ConfigurationIdentity(client, version));

            configs.Add(sampleConfigInstance);
            var command = new PushSnapshotToClientCommand {
                SnapshotId = snapShotId, TargetClient = client, ConfigsToCopy = new string[] { sampleConfigInstance.Name }
            };
            var result = await target.Handle(command);

            Assert.True(result.IsSuccessful);
            configRepository.Verify(c => c.UpdateConfigAsync(sampleConfigInstance), Times.Once);
        }