Beispiel #1
0
        public void WillNotPassWithMismatchedCultures()
        {
            var checker = new CountryChecker(CultureInfo.GetCultureInfo("fr-CA"));
            var user = new TestUser { Culture = CultureInfo.GetCultureInfo("fr-FR") };

            Assert.False(checker.Check(Feature.Doughnuts, user));
        }
Beispiel #2
0
        public void WillPassWhenUserHasMatchingCulture()
        {
            var checker = new CountryChecker(CultureInfo.GetCultureInfo("fr-CA"));
            var user = new TestUser { Culture = CultureInfo.GetCultureInfo("fr-CA") };

            Assert.True(checker.Check(Feature.Doughnuts, user));
        }
Beispiel #3
0
 public void ByDefaultNoCountriesPass()
 {
     var checker = new CountryChecker();
      Assert.False(checker.Check(Feature.Doughnuts, new TestUser()));
 }