コード例 #1
0
        public void GetSetExtension_Should_Throw_On_Null()
        {
            IResolveFieldContext context = null;

            Should.Throw <ArgumentNullException>(() => context.GetExtension("e"));
            Should.Throw <ArgumentNullException>(() => context.SetExtension("e", 1));

            context = new ResolveFieldContext();
            context.GetExtension("a").ShouldBe(null);
            context.GetExtension("a.b.c.d").ShouldBe(null);
            Should.Throw <ArgumentException>(() => context.SetExtension("e", 1));
        }