Ejemplo n.º 1
0
        public void FromJson_StringValue_AreEqual()
        {
            var act = JsonTester.Read <Elo>(TestStruct.ToString(CultureInfo.InvariantCulture));
            var exp = TestStruct;

            Assert.AreEqual(exp, act);
        }
Ejemplo n.º 2
0
        public void ToString_CustomFormatter_SupportsCustomFormatting()
        {
            using (new CultureInfoScope(CultureInfo.InvariantCulture))
            {
                var act = TestStruct.ToString("Unit Test Format", new UnitTestFormatProvider());
                var exp = "Unit Test Formatter, value: '1732.4', format: 'Unit Test Format'";

                Assert.AreEqual(exp, act);
            }
        }