public void GetNewIv_Should_Call_GetNonZeroBytes_Once() { var rngMock = new Mock <RandomNumberGenerator>(MockBehavior.Loose); var generator = new IvGenerator(rngMock.Object); generator.GetNewIv(); rngMock.Verify(rng => rng.GetNonZeroBytes(ZeroByteArrayWithLength4()), Times.Once()); }
public void GetNewIv_Should_Call_GetNonZeroBytes_Once() { var rngMock = new Mock<RandomNumberGenerator>(MockBehavior.Loose); var generator = new IvGenerator(rngMock.Object); generator.GetNewIv(); rngMock.Verify(rng => rng.GetNonZeroBytes(ZeroByteArrayWithLength4()), Times.Once()); }