public ConditionalAttribute(string valueSource, BoolTest test) : base(TestPhase, 0) { ValueSource = valueSource; BoolTest = test; Type = TestType.Bool; }
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)"); }
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)"); }
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)"); }
private static void UpdateBoolVisibility(VisualElement element, bool value, BoolTest test) { element.SetDisplayed((value && test == BoolTest.ShowIfTrue) || (!value && test == BoolTest.ShowIfFalse)); }