public void ShouldCheckIfDoesNotContain(DbItem item, DbItemChildCollection sut)
    {
      // act
      var result = sut.Contains(item);

      // assert
      result.Should().BeFalse();
    }
示例#2
0
        public void ShouldCopyTo([Frozen] DbItem item, [Greedy] DbItemChildCollection sut)
        {
            var array = new DbItem[3];

            sut.CopyTo(array, 0);

            array.Should().Contain(item);
        }
    public void ShouldAdd(DbItem item, DbItemChildCollection sut)
    {
      // act
      sut.Add(item);

      // assert
      sut.Count.Should().Be(1);
    }
    public void ShouldClear(DbItemChildCollection sut)
    {
      // act
      sut.Clear();

      // assert
      sut.Count.Should().Be(0);
    }
    public void ShouldCheckIfReadonly([Frozen] DbItem parent, ReadOnlyCollection<DbItem> items)
    {
      // arrange
      var sut = new DbItemChildCollection(parent, items);

      // act
      var result = sut.IsReadOnly;

      // assert
      result.Should().BeTrue();
    }
 public void ShouldCheckIfReadonly(DbItem parent, ReadOnlyCollection<DbItem> items)
 {
   var sut = new DbItemChildCollection(parent, items);
   sut.IsReadOnly.Should().BeTrue();
 }
 public void ShouldCheckIfDoesNotContain(DbItem item, DbItemChildCollection sut)
 {
   sut.Contains(item).Should().BeFalse();
 }
 public void ShouldClear(DbItemChildCollection sut)
 {
   sut.Clear();
   sut.Count.Should().Be(0);
 }
 public void ShouldAdd(DbItem item, DbItemChildCollection sut)
 {
   sut.Add(item);
   sut.Count.Should().Be(1);
 }
示例#10
0
 public void ShouldGetEnumerator(DbItemChildCollection sut)
 {
     ((IEnumerable)sut).GetEnumerator().Should().NotBeNull();
 }
示例#11
0
 public void ShouldCheckIfNotReadonly(DbItemChildCollection sut)
 {
     sut.IsReadOnly.Should().BeFalse();
 }
示例#12
0
        public void ShouldCheckIfReadonly(DbItem parent, ReadOnlyCollection <DbItem> items)
        {
            var sut = new DbItemChildCollection(parent, items);

            sut.IsReadOnly.Should().BeTrue();
        }
 public void ShouldCheckIfNotReadonly(DbItemChildCollection sut)
 {
   sut.IsReadOnly.Should().BeFalse();
 }
示例#14
0
 public void ShouldCheckIfContains([Frozen] DbItem item, [Greedy] DbItemChildCollection sut)
 {
     sut.Contains(item).Should().BeTrue();
 }
示例#15
0
 public void ShouldCheckIfDoesNotContain(DbItem item, DbItemChildCollection sut)
 {
     sut.Contains(item).Should().BeFalse();
 }
示例#16
0
 public void ShouldClear(DbItemChildCollection sut)
 {
     sut.Clear();
     sut.Count.Should().Be(0);
 }
示例#17
0
 public void ShouldAdd(DbItem item, DbItemChildCollection sut)
 {
     sut.Add(item);
     sut.Count.Should().Be(1);
 }
    public void ShouldCheckIfNotReadonly(DbItemChildCollection sut)
    {
      // act
      var result = sut.IsReadOnly;

      // assert
      result.Should().BeFalse();
    }
 public void ShouldGetEnumerator(DbItemChildCollection sut)
 {
   ((IEnumerable)sut).GetEnumerator().Should().NotBeNull();
 }
示例#20
0
 public void ShouldRemove([Frozen] DbItem item, [Greedy] DbItemChildCollection sut)
 {
     sut.Remove(item);
     sut.Count.Should().Be(2);
 }