public void RegisterGenericType() { _builder.Register <Class2>(); ICodingDojoContainer container = _builder.Build(); object class1 = container.Resolve(typeof(Class2)); class1.Should().BeAssignableTo <Class2>(); }
public void RegisterObject() { Class2 classWithDependencies = new Class2(); _builder.RegisterSingleton(classWithDependencies); ICodingDojoContainer container = _builder.Build(); object class1Resolved = container.Resolve(typeof(Class2)); class1Resolved.Should().BeEquivalentTo(classWithDependencies); }