예제 #1
0
 public ConditionalAttribute(string valueSource, BoolTest test) : base(TestPhase, 0)
 {
     ValueSource = valueSource;
     BoolTest    = test;
     Type        = TestType.Bool;
 }
예제 #2
0
        public void TestUpdateBy1()
        {
            BoolTest.UpdateBy(p => p.Available, new { Name = "aa", Available = false });
            AssertSql(@"UPDATE [Bool_Test] SET [Name]=@Name_0,[Available]=@Available_1  WHERE [Available] = @Available_2;
<Text><30>(@Name_0=aa:String,@Available_1=False:Boolean,@Available_2=True:Boolean)");
        }
예제 #3
0
 public void TestInClause4()
 {
     BoolTest.Where(p => p.Id.InStatement(EnumTest.Where(x => x.Id >= 5).GetStatement(x => x.Id))).Select();
     AssertSql("SELECT [Id],[Name],[Available] FROM [Bool_Test] WHERE [Id] IN (SELECT [Id] FROM [Enum_Test] WHERE [Id] >= @Id_0);\n<Text><60>(@Id_0=5:Int64)");
 }
예제 #4
0
        public void TestUpdateBy0()
        {
            BoolTest.UpdateBy(p => p.Available, new { Name = "aa" });
            AssertSql(@"UPDATE [Bool_Test] SET [Name]=@Name_0  WHERE [Available] = @Available_1;
<Text><30>(@Name_0=aa:String,@Available_1=True:Boolean)");
        }
예제 #5
0
 private static void UpdateBoolVisibility(VisualElement element, bool value, BoolTest test)
 {
     element.SetDisplayed((value && test == BoolTest.ShowIfTrue) || (!value && test == BoolTest.ShowIfFalse));
 }