public void Constructor_RandIsSet()
        {
            IRandomExtensions rand = Mock.Of<IRandomExtensions>();
            var target = new RandomBinaryDataSource(rand, 1, 2);

            Assert.AreEqual(rand, target.Random, "The Random Property was not set properly.");
        }
        public void Next()
        {
            Mock<IRandomExtensions> randMock = new Mock<IRandomExtensions>();
            var target = new RandomBinaryDataSource(randMock.Object, 1, 2);
            target.Next(null);

            randMock.Verify(a => a.GetBinary(1, 2), @"
            The GetBinary method on the IRandomExtensions object was not called.
            ");
        }
 public void Constructor_MinLengthSetAgain()
 {
     RandomBinaryDataSource source = new RandomBinaryDataSource(10, 11);
     Assert.AreEqual(10, source.MinLength);
 }
 public void Constructor_MaxLengthSet()
 {
     RandomBinaryDataSource source = new RandomBinaryDataSource(0, 1);
     Assert.AreEqual(1, source.MaxLength);
 }