Baseline.Testing.LightweightCacheTests.when_key_not_found_should_throw_by_default C# (CSharp) Method

when_key_not_found_should_throw_by_default() private method

private when_key_not_found_should_throw_by_default ( ) : void
return void
        public void when_key_not_found_should_throw_by_default()
        {
            const string key = "nonexisting key";

            Exception<KeyNotFoundException>.ShouldBeThrownBy(() => cache[key].ShouldBe(0)).
                Message.ShouldBe("Key '{0}' could not be found".ToFormat(key));
        }