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 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 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); }