private void AssertAllMethodsRegistered(NameBasedMethodCallTransformerRegistry registry, Type type) { var methodNames = (string[])type.GetField("SupportedMethodNames").GetValue(null); Assert.That(methodNames.Length, Is.GreaterThan(0)); foreach (var methodName in methodNames) { Assert.That(registry.GetItem(methodName), Is.TypeOf(type)); } }
public void Register_NewMethod() { _methodCallTransformerRegistry.Register(_methodName, _transformerStub); var expectedTransformer = _methodCallTransformerRegistry.GetItem(_methodName); Assert.That(_transformerStub, Is.SameAs(expectedTransformer)); }
private void AssertAllMethodsRegistered (NameBasedMethodCallTransformerRegistry registry, Type type) { var methodNames = (string[]) type.GetField ("SupportedMethodNames").GetValue (null); Assert.That (methodNames.Length, Is.GreaterThan (0)); foreach (var methodName in methodNames) Assert.That (registry.GetItem(methodName), Is.TypeOf (type)); }