示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }