static void Main(string[] args) { if (args.Length == 2) { var binaryMultiplicationOfTwoNumbers = new BinaryMultiplicationOfTwoNumbers(); var result = binaryMultiplicationOfTwoNumbers.MultiplyTheBinaryWay(Convert.ToInt32(args[0]), Convert.ToInt32(args[1])); Console.WriteLine("The result the binary way is {0}", result); } else { Console.WriteLine("I will only accept 2 integers today..."); } }
public void Multiply256Times19Success() { var binaryMultiplicationOfTwoNumbers = new BinaryMultiplicationOfTwoNumbers(); Assert.AreEqual(4864, binaryMultiplicationOfTwoNumbers.MultiplyTheBinaryWay(256, 19)); }
public void Multiply11Times14Success() { var binaryMultiplicationOfTwoNumbers = new BinaryMultiplicationOfTwoNumbers(); Assert.AreEqual(154, binaryMultiplicationOfTwoNumbers.MultiplyTheBinaryWay(11, 14)); }
public void Multiply102Times233Success() { var binaryMultiplicationOfTwoNumbers = new BinaryMultiplicationOfTwoNumbers(); Assert.AreEqual(23766, binaryMultiplicationOfTwoNumbers.MultiplyTheBinaryWay(102, 233)); }
public void Multiply1021Times2331Success() { var binaryMultiplicationOfTwoNumbers = new BinaryMultiplicationOfTwoNumbers(); Assert.AreEqual(2379951, binaryMultiplicationOfTwoNumbers.MultiplyTheBinaryWay(1021, 2331)); }
public void Multiply10216Times23312Success() { var binaryMultiplicationOfTwoNumbers = new BinaryMultiplicationOfTwoNumbers(); Assert.AreEqual(238155392, binaryMultiplicationOfTwoNumbers.MultiplyTheBinaryWay(10216, 23312)); }