ZeroInstall.Store.ConfigTest.TestGetSetValue C# (CSharp) Method

TestGetSetValue() private method

private TestGetSetValue ( ) : void
return void
        public void TestGetSetValue()
        {
            var config = new Config();
            config.Invoking(x => x.SetOption("Test", "Test")).ShouldThrow<KeyNotFoundException>();

            config.HelpWithTesting.Should().BeFalse();
            config.GetOption("help_with_testing").Should().Be("False");
            config.SetOption("help_with_testing", "True");
            config.Invoking(x => x.SetOption("help_with_testing", "Test")).ShouldThrow<FormatException>();
            config.HelpWithTesting.Should().BeTrue();
            config.GetOption("help_with_testing").Should().Be("True");

            config.SetOption("freshness", "10");
            config.Freshness.Should().Be(TimeSpan.FromSeconds(10));
            config.GetOption("freshness").Should().Be("10");
        }