public void System_Numerics_BigInteger_And_BigIntegerLibrary_Should_Be_The_Same(string number)
        {
            var systemBigInt900  = new BigInteger(900);
            var libraryBigInt900 = new BigIntegerLibrary.BigInteger(900);
            var systemBigInt     = BigInteger.Parse(number);
            var libraryBigInt    = BigIntegerLibrary.BigInteger.Parse(number);

            var systemResult  = systemBigInt % systemBigInt900;
            var libraryResult = BigIntegerLibrary.BigInteger.Modulo(libraryBigInt, libraryBigInt900);

            Assert.AreEqual(systemResult.ToString(), libraryResult.ToString());
        }
Example #2
0
      public void System_Numerics_BigInteger_And_BigIntegerLibrary_Should_Be_The_Same(string number)
      {
         var systemBigInt900 = new BigInteger(900);
         var libraryBigInt900 = new BigIntegerLibrary.BigInteger(900);
         var systemBigInt = BigInteger.Parse(number);
         var libraryBigInt = BigIntegerLibrary.BigInteger.Parse(number);

         var systemResult = systemBigInt%systemBigInt900;
         var libraryResult = BigIntegerLibrary.BigInteger.Modulo(libraryBigInt, libraryBigInt900);

         Assert.AreEqual(systemResult.ToString(), libraryResult.ToString());
      }
Example #3
0
 public static byte[] ToByteArray(this BigIntegerLibrary.BigInteger bi)
 {
     return(new byte[90]);
 }