public void EncodeExample4() { SwicoBillInformation billInfo = SwicoExamples.CreateExample3(); string text = billInfo.EncodeAsText(); Assert.Equal(SwicoExamples.Example3Text, text); }
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; } }
public void Example3_FullyDecoded() { var billInformation = SwicoBillInformation.DecodeText(SwicoExamples.Example3Text); Assert.Equal(SwicoExamples.CreateExample3(), billInformation); }