public void observable_should_note_drop_a_marble_when_file_is_not_updated()
            {
                var model = new TestConfigured();

                _cut.CreateConfigFile(model);

                var observable = _cut.Get(ConfigurationResult <TestConfigured> .Create()).Observable;

                var result = observable.Capture(0.15);

                result.Should().BeNull();
            }
            public void should_return_deserialized_config_contents()
            {
                var model = new TestConfigured();

                _cut.CreateConfigFile(model);

                var configurationResult = _cut.Get(ConfigurationResult <TestConfigured> .Create());

                configurationResult.Result.AppKey.Should().Be(model.AppKey);
                configurationResult.Result.IsEnabled.Should().Be(model.IsEnabled);
                configurationResult.Result.EnabledOn.Should().Be(model.EnabledOn);
            }
            public void observable_should_drop_a_marble_when_file_is_updated()
            {
                var model = new TestConfigured();

                _cut.CreateConfigFile(model);

                var observable = _cut.Get(ConfigurationResult <TestConfigured> .Create()).Observable;

                var update = observable.CaptureFirst(() =>
                {
                    model.IsEnabled = false;
                    model.AppKey    = "different key";
                    model.EnabledOn = DateTime.UtcNow.AddDays(10);
                    _cut.CreateConfigFile(model);
                });

                update.AppKey.Should().Be(model.AppKey);
                update.IsEnabled.Should().Be(model.IsEnabled);
                update.EnabledOn.Should().Be(model.EnabledOn);
            }