public virtual void BorderTopTest01() { String shorthandExpression = "10px hidden rgba(12,225,100,0.7)"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("border-top-width: 10px" , "border-top-style: hidden", "border-top-color: rgba(12,225,100,0.7)")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BORDER_TOP); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void OutlineTest01() { String shorthandExpression = "#00ff00 dashed medium"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("outline-color: #00ff00" , "outline-style: dashed", "outline-width: medium")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.OUTLINE); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void NoneInlistStyleImageTest() { String shorthandExpression = "circle none inside"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("list-style-type: circle" , "list-style-position: inside", "list-style-image: none")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.LIST_STYLE); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void PaddingTest03() { String shorthandExpression = "inherit"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("padding-top: inherit" , "padding-right: inherit", "padding-bottom: inherit", "padding-left: inherit")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.PADDING); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void NotExistingXValueTest() { String shorthandExpression = "30jacoco 50pt"; ICollection <String> expectedResolvedProperties = new HashSet <String>(); IShorthandResolver backgroundResolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BACKGROUND_POSITION ); NUnit.Framework.Assert.IsNotNull(backgroundResolver); IList <CssDeclaration> resolvedShorthandProps = backgroundResolver.ResolveShorthand(shorthandExpression); CssShorthandResolverTest.CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void MarginTest02() { String shorthandExpression = "2cm auto 4cm"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("margin-top: 2cm" , "margin-right: auto", "margin-bottom: 4cm", "margin-left: auto")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.MARGIN); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void InvalidDoubleHorizontalWithCenterAndVerticalValueTest() { String shorthandExpression = "center top left"; ICollection <String> expectedResolvedProperties = new HashSet <String>(); IShorthandResolver backgroundResolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BACKGROUND_POSITION ); NUnit.Framework.Assert.IsNotNull(backgroundResolver); IList <CssDeclaration> resolvedShorthandProps = backgroundResolver.ResolveShorthand(shorthandExpression); CssShorthandResolverTest.CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void BorderRightTest01() { String shorthandExpression = "10px double rgb(12,220,100)"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("border-right-width: 10px" , "border-right-style: double", "border-right-color: rgb(12,220,100)")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BORDER_RIGHT ); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void BorderLeftTest01() { String shorthandExpression = "10px solid #ff0000"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("border-left-width: 10px" , "border-left-style: solid", "border-left-color: #ff0000")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BORDER_LEFT ); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void FontTest09() { String shorthandExpression = "Georgia , 'Times New Roman', serif"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("font-style: initial" , "font-variant: initial", "font-weight: initial", "font-size: initial", "line-height: initial", "font-family: georgia,'Times New Roman',serif" )); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.FONT); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void BorderBottomTest01() { String shorthandExpression = "15px dotted blue"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("border-bottom-width: 15px" , "border-bottom-style: dotted", "border-bottom-color: blue")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BORDER_BOTTOM ); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void RepeatingLinearGradientInlistStyleImageTest() { String shorthandExpression = "square inside repeating-linear-gradient(45deg, blue 7%, red 10%)"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("list-style-type: square" , "list-style-position: inside", "list-style-image: repeating-linear-gradient(45deg,blue 7%,red 10%)") ); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.LIST_STYLE); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void BorderColorTest02() { String shorthandExpression = "red"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("border-top-color: red" , "border-right-color: red", "border-bottom-color: red", "border-left-color: red")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BORDER_COLOR ); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void BorderStyleTest01() { String shorthandExpression = "dotted solid double dashed"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("border-top-style: dotted" , "border-right-style: solid", "border-bottom-style: double", "border-left-style: dashed")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BORDER_STYLE ); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void BorderWidthTest01() { String shorthandExpression = "thin medium thick 10px"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("border-top-width: thin" , "border-right-width: medium", "border-bottom-width: thick", "border-left-width: 10px")); IShorthandResolver resolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BORDER_WIDTH ); NUnit.Framework.Assert.IsNotNull(resolver); IList <CssDeclaration> resolvedShorthandProps = resolver.ResolveShorthand(shorthandExpression); CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }
public virtual void MultiValueMissedValueTest() { String shorthandExpression = "left,top"; ICollection <String> expectedResolvedProperties = new HashSet <String>(JavaUtil.ArraysAsList("background-position-x: left,center" , "background-position-y: center,top")); IShorthandResolver backgroundResolver = ShorthandResolverFactory.GetShorthandResolver(CommonCssConstants.BACKGROUND_POSITION ); NUnit.Framework.Assert.IsNotNull(backgroundResolver); IList <CssDeclaration> resolvedShorthandProps = backgroundResolver.ResolveShorthand(shorthandExpression); CssShorthandResolverTest.CompareResolvedProps(resolvedShorthandProps, expectedResolvedProperties); }