Exemple #1
0
 public virtual void BackgroundPositionValidationTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_POSITION_X, "initial")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_POSITION_Y, "-0")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_POSITION_Y, "5px")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_POSITION_X, "5em")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_POSITION_Y, "5px, 5%, bottom")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_POSITION_X, "left 5%, right")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_POSITION_X, "5")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_POSITION_Y, "ja")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_POSITION_X, "initial 5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_POSITION_Y, "ja, 5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_POSITION_X, "initial, 5px")));
 }
Exemple #2
0
 public virtual void BackgroundImageTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_IMAGE, "initial")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_IMAGE, "url(rock_texture.jpg)")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_IMAGE, "linear-gradient(red,green,blue)")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_IMAGE, "url()")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_IMAGE, "none")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_IMAGE, "url(img.jpg),url(img2.jpg)")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_IMAGE, "none,url(img2.jpg)")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_IMAGE, "linear-gradient(red,green,blue),url(img2.jpg)")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_IMAGE, "ja")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_IMAGE, "5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_IMAGE, "url(url(rock_texture.jpg)")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_IMAGE, "true-linear-gradient(red,green,blue)")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_IMAGE, "url(img.jpg) url(img2.jpg)")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_IMAGE, "initial,url(img.jpg)")));
 }
Exemple #3
0
 public virtual void TextIndentValidationTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .TEXT_INDENT, "5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .TEXT_INDENT, "5jaja")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .TEXT_INDENT, "normal")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .TEXT_INDENT, "5%")));
 }
Exemple #4
0
 public virtual void LetterSpacingValidationTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .LETTER_SPACING, "5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .LETTER_SPACING, "5jaja")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .LETTER_SPACING, "normal")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .LETTER_SPACING, "5%")));
 }
Exemple #5
0
 public virtual void FontSizeNumericValidationTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .FONT_SIZE, "5jaja")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .FONT_SIZE, "normal")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "5%")));
 }
Exemple #6
0
 public virtual void LineHeightValidationTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .LINE_HEIGHT, "5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .LINE_HEIGHT, "5jaja")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .LINE_HEIGHT, "normal")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .LINE_HEIGHT, "5%")));
 }
Exemple #7
0
 public virtual void BackgroundSizeTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "initial")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "0")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "10px")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "10%")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "10% 10px")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "10px 10em")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "auto")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "auto 10px")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "10px auto")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "cover")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "contain")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "5px, 10%, auto")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_SIZE, "5px 10%, 20em")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_SIZE, "ja")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_SIZE, "10")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_SIZE, "cover 10px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_SIZE, "initial 10px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_SIZE, "10px contain")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_SIZE, "ja, 5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_SIZE, "5px, ja")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_SIZE, "initial, 10px")));
 }
Exemple #8
0
 public virtual void FontSizeEnumValidationTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "larger")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "smaller")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "xx-small")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "x-small")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "small")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "medium")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "large")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "x-large")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .FONT_SIZE, "xx-large")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .FONT_SIZE, "smaler")));
 }
Exemple #9
0
 public virtual void BackgroundClipTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_CLIP, "initial")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_CLIP, "border-box")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_CLIP, "padding-box")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_CLIP, "content-box")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_CLIP, "content-box, border-box")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_CLIP, "5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_CLIP, "ja")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_CLIP, "border-box border-box")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_CLIP, "content-box padding-box")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_CLIP, "ja, padding-box")));
 }
Exemple #10
0
 public virtual void BackgroundRepeatValidationTest()
 {
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "initial")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "no-repeat")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "repeat no-repeat")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "space")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "round")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "space repeat")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "no-repeat round")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "no-repeat,repeat")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "no-repeat repeat,repeat")));
     NUnit.Framework.Assert.IsTrue(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                      .BACKGROUND_REPEAT, "repeat-x, repeat no-repeat")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_REPEAT, "5px")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_REPEAT, "ja")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_REPEAT, "repeat-x repeat")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_REPEAT, "initial repeat")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_REPEAT, "repeat, repeat-x repeat")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_REPEAT, "ja, repeat")));
     NUnit.Framework.Assert.IsFalse(CssDeclarationValidationMaster.CheckDeclaration(new CssDeclaration(CommonCssConstants
                                                                                                       .BACKGROUND_REPEAT, "initial, repeat")));
 }