public void TwoFactorMainTest() { /* * Using parallel for multiple two factor tests */ Parallel.For(1, Romano.MAX_VALUE + 1, i => { var arabic = (ushort)i; var roman = Romano.Romanize(arabic); /* * Basic roman two factor tests, with strict options * IV */ Assert.Equal(arabic, Romano.Humanize(roman)); /* * Four sequential digits tests * IIII */ roman = Romano.Romanize(arabic, RomanizerOptions.ALLOW_FOUR_SEQUENTIAL_DIGITS); Assert.Equal(arabic, Romano.Humanize(roman, RomanizerOptions.ALLOW_FOUR_SEQUENTIAL_DIGITS)); /* * Multiple sequential digits tests * IIIII */ roman = Romano.Romanize(arabic, RomanizerOptions.ALLOW_MULTIPLE_SEQUENTIAL_DIGITS); Assert.Equal(arabic, Romano.Humanize(roman, RomanizerOptions.ALLOW_MULTIPLE_SEQUENTIAL_DIGITS)); }); }
public void ToRomanTest(ushort number, string expect) { var result = Romano.Romanize(number); Assert.Equal(expect, result); }
public static string Romanizer(this decimal val) { return(Romano.Romanize(val)); }
public static string Romanizer(this double val) { return(Romano.Romanize(val)); }
public static string Romanizer(this float val) { return(Romano.Romanize(val)); }
public static string Romanizer(this ulong val) { return(Romano.Romanize(val)); }
public static string Romanizer(this ushort val) { return(Romano.Romanize(val)); }