public void GetSetExtension_Should_Throw_On_Null()
    {
        IResolveFieldContext context = null;

        Should.Throw <ArgumentNullException>(() => context.GetOutputExtension("e"));
        Should.Throw <ArgumentNullException>(() => context.SetOutputExtension("e", 1));

        context = new ResolveFieldContext();
        context.GetOutputExtension("a").ShouldBe(null);
        context.GetOutputExtension("a.b.c.d").ShouldBe(null);
        Should.Throw <ArgumentException>(() => context.SetOutputExtension("e", 1));
    }
Exemple #2
0
 public static IObservable <string> TestWithInitialExtensions(IResolveFieldContext context, [FromServices] IObservable <string> source)
 {
     context.SetOutputExtension("alpha", "beta");
     return(source);
 }