public virtual void NextBytesTest() { Initialize(); byte[] bufferExpected = CsvReader.ReadNextBytes(CreateRandomItem()); byte[] bufferActual = new byte[bufferExpected.Length]; m_Random.NextBytes(bufferActual); Console.WriteLine("サンプル数:{0}回", bufferExpected.Length); Console.WriteLine("実装元ライブラリから同じシードで生成された乱数アルゴリズムのNextBytes()関数との一致を確認します"); for (int i = 0; i < bufferExpected.Length; i++) { Console.Write("{0} : ", i); Console.Write("Expected = {0}", bufferExpected[i]); Console.WriteLine(" , Actual = {0}", bufferActual[i]); Assert.AreEqual(bufferExpected[i], bufferActual[i], "{0}", i, bufferExpected[i], bufferActual[i]); } }