public void TestLocalizationWithResultLocalizedIt()
 {
     ErrorMessage sut = new ErrorMessage(() => TestRes.TestToken);
     SingleValidationResult res = new SingleValidationResult(false, "Exp", "Act", "Source");
     Assert.That(sut.ToString(System.Globalization.CultureInfo.CreateSpecificCulture("It"), res),
         Is.EqualTo("Atteso " + "Exp" + " Attuale " + "Act"));
 }
 public void TestLocalizationItProperty()
 {
     ErrorMessage sut =
         new ErrorMessage("Test", TestRes.ResourceManager);
     Assert.That(sut.ToString(System.Globalization.CultureInfo.CreateSpecificCulture("It-It")), Is.EqualTo("Questa è una stringa di test"));
 }
 public void TestLocalizationWithResultLocalized()
 {
     ErrorMessage sut = new ErrorMessage(() => TestRes.TestToken);
     SingleValidationResult res = new SingleValidationResult(false, "Exp", "Act", "Source");
     Assert.That(sut.ToString(res),
         Is.EqualTo("Expected " + "Exp" + " Actual " + "Act"));
 }
 public void TestLocalizationItFullFluent()
 {
     ErrorMessage sut = new ErrorMessage(() => TestRes.Test);
     Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CreateSpecificCulture("It-It");
     Assert.That(sut.ToString(), Is.EqualTo("Questa è una stringa di test"));
 }
 public void TestLocalizationItFullFluentExplicitCultureDe()
 {
     ErrorMessage sut = new ErrorMessage(() => TestRes.Test);
     Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.CreateSpecificCulture("En-Us");
     Assert.That(sut.ToString(System.Globalization.CultureInfo.CreateSpecificCulture("De")), Is.EqualTo("German Value"));
 }
 public void TestLocalizationIt()
 {
     ErrorMessage sut =
         new ErrorMessage("Test", "DotNetMarche.Validator.Tests.ResourcesFiles.TestRes, DotNetMarche.Validator.Tests");
     Assert.That(sut.ToString(System.Globalization.CultureInfo.CreateSpecificCulture("It-It")), Is.EqualTo("Questa è una stringa di test"));
 }
 public void TestLocalizationDeProperty()
 {
     ErrorMessage sut =
         new ErrorMessage("Test", TestRes.ResourceManager);
     Assert.That(sut.ToString(System.Globalization.CultureInfo.CreateSpecificCulture("De")), Is.EqualTo("German Value"));
 }
 public void TestLocalizationDe()
 {
     ErrorMessage sut =
         new ErrorMessage("Test", "DotNetMarche.Validator.Tests.ResourcesFiles.TestRes, DotNetMarche.Validator.Tests");
     Assert.That(sut.ToString(System.Globalization.CultureInfo.CreateSpecificCulture("De")), Is.EqualTo("German Value"));
 }
 public void TestMessageWithResult()
 {
     ErrorMessage sut = new ErrorMessage("Expected " + ErrorMessage.sTokenExpectedValue + " actual " + ErrorMessage.sTokenActualValue);
     SingleValidationResult res = new SingleValidationResult(false, "Exp", "Act", "Source");
     Assert.That(sut.ToString(res),
         Is.EqualTo("Expected " + "Exp" + " actual " + "Act"));
 }
 public void TestBasicResourceManagerWithNullExpectedAndActual()
 {
     Thread.CurrentThread.CurrentCulture = new CultureInfo("En-us");
     ErrorMessage msg = new ErrorMessage("Expected ${ExpectedValue} Actual ${ActualValue}");
     msg.ToString(new SingleValidationResult(false, null, null, "property"));
 }