Ejemplo n.º 1
0
 public void TestCurrencyFromDoubleInput()
 {
     Assert.AreEqual("$6.85", StandardFilters.Currency(6.8458, "en-US"));
     Assert.AreEqual("$6.72", StandardFilters.Currency(6.72, "en-CA"));
     Assert.AreEqual("6.000.000,00 €", StandardFilters.Currency(6000000, "de-DE"));
     Assert.AreEqual("6.000.000,78 €", StandardFilters.Currency(6000000.78, "de-DE"));
 }
Ejemplo n.º 2
0
        public void TestEuroCurrencyFromString(string input, string expected)
        {
#if CORE
            CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
#else
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
#endif
            Assert.AreEqual(expected, StandardFilters.Currency(input, "de-DE"));
        }
Ejemplo n.º 3
0
 public void TestMalformedCurrency()
 {
     Assert.AreEqual("teststring", StandardFilters.Currency("teststring", "de-DE"));
 }