anchor.diff:    Result := LowerCase(Result);
   end;
   
  -function TDUnitXIoC.InternalResolve(const typeInfo: PTypeInfo; out AInterface: IInterface; const AName: string): TResolveResult;
  +function TDUnitXIoC.InternalResolve(const typeInfo: PTypeInfo; const AName: string): IInterface;
   var
     key : string;
  -  container : TDictionary<string,TIoCRegistration>;
     registration : TIoCRegistration;
  -  bInstanciate : Boolean;
  -begin
  -  AInterface := nil;
  -  Result := TResolveResult.Unknown;
  -
  -  //Get the key for the interace we are resolving and locate the container for that key.
  +begin
  +  Result := nil;
  +
     key := GetInterfaceKey(typeInfo, AName);
  -  container := FContainerInfo;
  -
  -  if not container.TryGetValue(key, registration) then
  -    Exit(TResolveResult.InterfaceNotRegistered);
  -
  -  bInstanciate := True;
  -
  -  if registration.IsSingleton then
  -  begin
  -    //If a singleton was registered with this interface then check if it's already been instanciated.
  -    if registration.Instance <> nil then
  -    begin
  -      AInterface := registration.Instance;
  -      bInstanciate := False;
  -    end;
  -  end;
  -
  -  if bInstanciate then
  -  begin
  -    AInterface := registration.ActivatorDelegate();
  -
  -    if AInterface = nil then
  -      Exit(TResolveResult.DeletegateFailedCreate);
  -  end;
  +
  +  if not FContainerInfo.TryGetValue(key, registration) then
  +    if FRaiseIfNotFound then
  +      raise EIoCResolutionException.CreateFmt('No implementation registered for type %s', [typeInfo.Name]);
  +
  +  Result := registration.ActivatorDelegate();
  +  if Result = nil then
  +    if FRaiseIfNotFound then
  +      raise EIoCResolutionException.CreateFmt('The activator delegate failed to return an instance %s', [typeInfo.Name]);
   end;
   
   procedure TDUnitXIoC.RegisterSingleton<TInterface>(const instance: TInterface; const name: string);
  
positive.code:   if not FContainerInfo.TryGetValue(key,rego) then
    begin
      rego := TIoCRegistration.Create;
      rego.Initialize(delegate, singleton, nil);
      FContainerInfo.Add(key, rego);
    end
    else
    begin
      //cannot replace a singleton that has already been instanciated.
      if rego.IsSingleton and (rego.Instance <> nil)  then
        raise EIoCRegistrationException.Create(Format('An implementation for type %s with name %s is already registered with IoC',[typeInfo.Name, name]));
      rego.Initialize(delegate, singleton, nil);
    end;
  end;
  
  
negative.code: begin
    Result := nil;
  
    delegate := CreateActivatorDelegate(AClass, TypeInfo(IInterface), False);
    if Assigned(delegate) then
      Result := delegate();
  end;
  
  class function TClassActivator.CreateActivatorDelegate(
    const AClass : TClass; typeInfo : PTypeInfo; raiseOnError : Boolean): TActivatorDelegate;
  var
    rType : TRttiType;
    method : TRttiMethod;
    guid : TGUID;
    ctor : function(InstanceOrVMT: Pointer; Alloc: ShortInt = 1): Pointer; // constructor signature
  begin
    Result := nil;
  