Esempio n. 1
0
        public void LikeWithMatchMode()
        {
            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
            var c = Localizable.Like("Description", "pi__a", MatchMode.Anywhere);

            c.Should().Be.OfType <LikeExpression>()
            .And.ValueOf.ToString()
            .Should().Be.EqualTo("Description like %~en-US~~%pi__a%~%");
        }
 public void SafeParameterSetWithCriteria()
 {
     FillDb();
     using (ISession s = OpenSession())
     {
         s.CreateCriteria <EntityWithLocalizableProperty>()
         .Add(Localizable.Like("LocalizableDescriptions", "en-US", "H_ll_"))
         .List <EntityWithLocalizableProperty>().Count
         .Should().Be.EqualTo(1);
     }
     Cleanup();
 }