public void OptionNames() { var s = new SuggestedActionsOptions(); var names = s.GetOptionNames(); Assert.AreEqual(propertyNames.Count, names.Count); }
public void BackgroundCustom() { var propertyIndex = 0; var expectedValue = CreateColor(); var src = new SuggestedActionsOptions { Background = expectedValue }; var so = PopulateOptions(src); AssertPopulatedProperty(so, propertyIndex, expectedValue); }
public void TextColorCustom() { var propertyIndex = 5; var expectedValue = CreateColor(); var src = new SuggestedActionsOptions { TextColor = expectedValue }; var so = PopulateOptions(src); AssertPopulatedProperty(so, propertyIndex, expectedValue); }
public void BorderWidthCustom() { var propertyIndex = 4; var expectedValue = new CSSLengthUnit(r.Next(10, 24), CSSUnit.Points); var src = new SuggestedActionsOptions { BorderWidth = expectedValue }; var so = PopulateOptions(src); AssertPopulatedProperty(so, propertyIndex, expectedValue.ToString()); }
public void BorderStyleCustom() { var propertyIndex = 3; var expectedValue = EnumHelpers.GetRandomValue <CSSBorderStyle>(SuggestedActionsOptions.Defaults.BorderStyle); var src = new SuggestedActionsOptions { BorderStyle = expectedValue }; var so = PopulateOptions(src); AssertPopulatedProperty(so, propertyIndex, expectedValue); }
public void BorderRadiusCustom() { var propertyIndex = 2; var expectedValue = new CSSLengthUnit(r.Next(10, 24), CSSUnit.Points);; var src = new SuggestedActionsOptions { BorderRadius = expectedValue }; var so = PopulateOptions(src); AssertPopulatedProperty(so, propertyIndex, expectedValue); }
public void BorderColorDisabledCustom() { var propertyIndex = 7; var expectedValue = CreateColor(); var src = new SuggestedActionsOptions(true) { BorderColor = expectedValue }; var so = PopulateOptions(src); AssertPopulatedProperty(so, propertyIndex, expectedValue); }
public void EmptyContructor() { var src = new SuggestedActionsOptions { }; var so = PopulateOptions(src); Assert.AreEqual(0, so.Count); so = PopulateOptions(src, true); Assert.AreEqual(7, so.Count); }
public void BorderDisabledCustom() { var propertyIndex = 13; var expectedValue = new CSSBorder("solid 1px violet"); var src = new SuggestedActionsOptions(true) { Border = expectedValue }; var so = PopulateOptions(src); AssertPopulatedProperty(so, propertyIndex, expectedValue?.CSSText); }
public void BackgroundDefault() { var propertyIndex = 0; var expectedValue = SuggestedActionsOptions.Defaults.Background; var src = new SuggestedActionsOptions { }; var so = PopulateOptions(src); AssertEmptyProperty(so, propertyIndex); so = PopulateOptions(src, true); AssertPopulatedProperty(so, propertyIndex, expectedValue); }
public void TextColorDefault() { var propertyIndex = 5; var expectedValue = SuggestedActionsOptions.Defaults.TextColor; var src = new SuggestedActionsOptions { }; var so = PopulateOptions(src); AssertEmptyProperty(so, propertyIndex); so = PopulateOptions(src, true); AssertPopulatedProperty(so, propertyIndex, expectedValue); }
public void BorderRadiusDefault() { var propertyIndex = 2; var expectedValue = SuggestedActionsOptions.Defaults.BorderRadius; var src = new SuggestedActionsOptions { }; var so = PopulateOptions(src); AssertEmptyProperty(so, propertyIndex); so = PopulateOptions(src, true); AssertPopulatedProperty(so, propertyIndex, expectedValue); }
public void BorderDefault() { var propertyIndex = 12; var expectedValue = SuggestedActionsOptions.Defaults.Border; var src = new SuggestedActionsOptions(false) { }; var so = PopulateOptions(src); AssertEmptyProperty(so, propertyIndex); so = PopulateOptions(src, true); AssertPopulatedProperty(so, propertyIndex, expectedValue?.CSSText); }
public void BorderWidthDisabledDefault() { var propertyIndex = 10; var expectedValue = SuggestedActionsOptions.DefaultsDisabled.BorderWidth; var src = new SuggestedActionsOptions(true) { }; var so = PopulateOptions(src); AssertEmptyProperty(so, propertyIndex); so = PopulateOptions(src, true); AssertPopulatedProperty(so, propertyIndex, expectedValue); }