예제 #1
0
    public void UnionWithSelectedColumns_NoColumns ()
    {
      var selectedColumns = MockRepository.GenerateStrictMock<ISelectedColumnsSpecification> ();

      selectedColumns.Replay ();

      var result = _specificationWithEmptyColumns.UnionWithSelectedColumns (selectedColumns);

      Assert.That (result, Is.SameAs (selectedColumns));
      selectedColumns.VerifyAllExpectations ();
    }
예제 #2
0
    public void UnionWithSelectedColumns ()
    {
      var selectedColumns = MockRepository.GenerateStrictMock<ISelectedColumnsSpecification>();

      selectedColumns
        .Expect (mock => mock.Union (Arg<IEnumerable<ColumnDefinition>>.List.Equal (new[] { _column1, _column2, _column3 })))
        .Return (selectedColumns);
      selectedColumns.Replay();

      var result = _specification.UnionWithSelectedColumns (selectedColumns);

      Assert.That (result, Is.SameAs (selectedColumns));
      selectedColumns.VerifyAllExpectations();
    }