public void ConfigureServices_WithMultipleKeysAndMethodDecoratedWithBoth_MethodIsCalledForBoth() { var target = new TargetClass(); target.ConfigureServices("Mno")(null); target.ConfigureServices("Pqr")(null); Assert.Equal(2, target.MnoPqrWasCalled); }
public void ConfigureServices_WithKeyForMethodWithoutCallback_IsCalled() { var target = new TargetClass(); target.ConfigureServices("Jkl")(null); Assert.True(target.JklWasCalled); }
public void ConfigureServices_WithKey_CallsProtectedInstanceMethodWithAttributeAndReturnValue() { var target = new TargetClass(); target.ConfigureServices("Def")(null); Assert.True(target.DefWasCalled); }
public void ConfigureServices_WithKey_CallsPrivateStaticMethodWithAttributeAndReturnValue() { var target = new TargetClass(); target.ConfigureServices("Abc")(null); Assert.True(TargetClass.AbcWasCalled); }
public void ConfigureServices_WithKeyForMultipleMethods_AllCallbacksAreCalled() { var target = new TargetClass(); target.ConfigureServices("Ghi")(null); Assert.True(target.Ghi0WasCalled, "Method with attribute"); Assert.True(target.Ghi1WasCalled, "Method with matching name"); }