public void BaseConversionCs_RevertAlphaToAlphaNumeric() { string value = "EaCfEvxNcbScvR"; char[] from = BaseConversionCs.alpha; char[] to = BaseConversionCs.alphaNumeric; Assert.AreEqual(value, BaseConversionCs.convert(to, from, BaseConversionCs.convert(from, to, value))); }
public void BaseConversionCs_StartsWithZero() { Assert.AreEqual("67452446421742473557475641125703753", BaseConversionCs.convert(BaseConversionCs.dec, BaseConversionCs.dec, "067452446421742473557475641125703753")); }
public void BaseConversionCs_DecToAlpha() { Assert.AreEqual("a", BaseConversionCs.convert(BaseConversionCs.dec, BaseConversionCs.alpha, "0")); }
public void BaseConversionCs_DecToAlphaLower() { Assert.AreEqual("bb", BaseConversionCs.convert(BaseConversionCs.dec, BaseConversionCs.alphaLower, "27")); }
public void BaseConversionCs_BinToHex() { Assert.AreEqual("a", BaseConversionCs.convert(BaseConversionCs.bin, BaseConversionCs.hex, "1010")); }
public void BaseConversionCs_BinToDec() { Assert.AreEqual("10", BaseConversionCs.convert(BaseConversionCs.bin, BaseConversionCs.dec, "1010")); }
public void BaseConversionCs_DecToOct() { Assert.AreEqual("17", BaseConversionCs.convert(BaseConversionCs.dec, BaseConversionCs.oct, "15")); }
public void BaseConversionCs_DecToBin() { Assert.AreEqual("1111", BaseConversionCs.convert(BaseConversionCs.dec, BaseConversionCs.bin, "15")); }
public void BaseConversionCs_alphaLowerToHex() { Assert.AreEqual("320048", BaseConversionCs.convert(BaseConversionCs.alphaLower, BaseConversionCs.hex, "hello")); }