anchor.diff:      procedure Counter;
     end;
   
  +  TFakeConstraint = class(TInterfacedObject, IDataConstraint)
  +  private
  +    FValue: Boolean;
  +    FId: string;
  +    FText: string;
  +  public
  +    constructor Create(Value: Boolean; const Id, Text: string);
  +    class function New(Value: Boolean; const Id, Text: string): IDataConstraint;
  +    function Checked: IDataResult;
  +  end;
  +
  +  TDataConstraintsTest = class(TTestCase)
  +  published
  +    procedure ReceiveConstraint;
  +    procedure GetConstraint;
  +    procedure CheckedTrue;
  +    procedure CheckedFalse;
  +    procedure CheckedTrueAndFalse;
  +  end;
  +
   implementation
  +
  +{ TFakeConstraint }
  +
  +constructor TFakeConstraint.Create(Value: Boolean; const Id, Text: string);
  +begin
  +  inherited Create;
  +  FValue := Value;
  +  FId := Id;
  +  FText := Text;
  +end;
  +
  +class function TFakeConstraint.New(Value: Boolean; const Id, Text: string
  +  ): IDataConstraint;
  +begin
  +  Result := Create(Value, Id, Text);
  +end;
  +
  +function TFakeConstraint.Checked: IDataResult;
  +begin
  +  Result := TDataResult.New(FValue, TDataInformation.New(FId, FText));
  +end;
   
   { TDataStreamTest }
   
  
positive.code: 
  uses
    Classes, SysUtils, fpcunit, testregistry,
    James.Data.Clss;
  
  type
  
negative.code:   );
  end;
  
  { TDataConstraintsTest }
  
  procedure TDataConstraintsTest.ReceiveConstraint;
  begin
    AssertTrue(
      TDataConstraints.New
        .Add(TFakeConstraint.New(True, 'id', 'foo'))
        .Checked
        .OK
    );
  end;
  
  procedure TDataConstraintsTest.GetConstraint;
  begin
    AssertEquals(
      'id: foo',
      TDataConstraints.New
        .Add(TFakeConstraint.New(True, 'id', 'foo'))
        .Get(0)
        .Checked
        .Informations
        .Text
    );
  end;
  
  procedure TDataConstraintsTest.CheckedTrue;
  begin
    AssertTrue(
      TDataConstraints.New
        .Add(TFakeConstraint.New(True, 'id', 'foo'))
        .Add(TFakeConstraint.New(True, 'id', 'foo'))
        .Checked
        .OK
    );
  end;
  
  procedure TDataConstraintsTest.CheckedFalse;
  begin
    AssertFalse(
      TDataConstraints.New
        .Add(TFakeConstraint.New(False, 'id', 'foo'))
        .Add(TFakeConstraint.New(False, 'id', 'foo'))
        .Checked
        .OK
    );
  end;
  
  procedure TDataConstraintsTest.CheckedTrueAndFalse;
  begin
    AssertFalse(
      TDataConstraints.New
        .Add(TFakeConstraint.New(True, 'id', 'foo'))
        .Add(TFakeConstraint.New(False, 'id', 'foo'))
        .Checked
        .OK
    );
  end;
  
  initialization
    RegisterTest('Data', TDataStreamTest);
    RegisterTest('Data', TDataInformationsTest);
    RegisterTest('Data', TDataConstraintsTest);
  
  end.
  