public void GetValueOrNew_ValueDoesNotExist_AddedIntoDictionary()
        {
            Dictionary<string, int> d = new Dictionary<string, int>();

            d.GetValueOrNew("some key");

            Assert.Contains("some key", d.Keys);
        }
        public void GetValueOrNew_ValueDoesNotExist_DefaultConstructorUsed()
        {
            Dictionary<string, MyType> d = new Dictionary<string, MyType>();

            MyType actual = d.GetValueOrNew("some key");

            Assert.Equal("Default", actual.Value);
        }
        public void GetValueOrNew_ValueDoesNotExists_ConstructorFunctionUsed()
        {
            Dictionary<string, string> d = new Dictionary<string, string>();

            string actual = d.GetValueOrNew("some key", () => "some value");

            Assert.Equal("some value", actual);
        }