public void TestBasicInjection() { var injectionRegistry = new InjectionRegistry(); var container = new Container(injectionRegistry); var instance = container.GetInstance<ISynchronousParameterizedCommand<DummyParameter, DummyResult>>(); var dummyParameter = new DummyParameter(); var result = instance.Execute(dummyParameter); Check.That(instance).IsNotNull(); }
public OtherData(ParameterType typeId, string n) { TypeId = typeId; Name = n; Factory = (name, id, defaultValue, document) => { Assert.That(LastGeneratorParameters, Is.EqualTo(null)); LastGeneratorParameters = new LastGeneratorParametersType(); LastGeneratorParameters.name = name; LastGeneratorParameters.id = id; LastGeneratorParameters.defaultValue = defaultValue; LastGeneratorParameters.document = document; var createdParameter = new DummyParameter(typeId, name, id, defaultValue); LastGeneratorParameters.createdParameter = createdParameter; return(createdParameter); }; }