Пример #1
0
        public void EncodeExample4()
        {
            SwicoBillInformation billInfo = SwicoExamples.CreateExample3();
            string text = billInfo.EncodeAsText();

            Assert.Equal(SwicoExamples.Example3Text, text);
        }
Пример #2
0
        public void DifferentLocales_HaveNoEffect(string locale)
        {
            CultureInfo savedCurrentCulture   = CultureInfo.CurrentCulture;
            CultureInfo savedCurrentUiCulture = CultureInfo.CurrentUICulture;

            CultureInfo culture = CultureInfo.CreateSpecificCulture(locale);

            try
            {
                CultureInfo.CurrentCulture   = culture;
                CultureInfo.CurrentUICulture = culture;

                var billInformation = SwicoBillInformation.DecodeText(SwicoExamples.Example3Text);
                Assert.Equal(SwicoExamples.CreateExample3(), billInformation);
            }
            finally
            {
                CultureInfo.CurrentCulture   = savedCurrentCulture;
                CultureInfo.CurrentUICulture = savedCurrentUiCulture;
            }
        }
Пример #3
0
        public void Example6_FullyDecoded()
        {
            var billInformation = SwicoBillInformation.DecodeText(SwicoExamples.Example6Text);

            Assert.Equal(SwicoExamples.CreateExample6(), billInformation);
        }