Beispiel #1
0
        public void Run(string scssSelector1, string scssSelector2, string resultXpath, string resultCss)
        {
            Scss scss1      = ScssBuilder.Create(scssSelector1);
            Scss scss2      = ScssBuilder.Create(scssSelector2);
            Scss resultScss = scss1.Concat(scss2);

            Assert.AreEqual(resultXpath, resultScss.Xpath);
            Assert.AreEqual(resultCss, resultScss.Css);
        }
Beispiel #2
0
        public Scss Concat(Scss scss2)
        {
            string resultXpath = XPathBuilder.Concat(Xpath, scss2.Xpath);
            string resultCss   = string.IsNullOrEmpty(Css) || string.IsNullOrEmpty(scss2.Css)
                ? string.Empty
                : CssBuilder.Concat(Css, scss2.Css);

            return(new Scss(resultXpath, resultCss));
        }
Beispiel #3
0
//        public static By GetBy(string scssSelector1, string scssSelector2) {
//            return ScssBuilder.Concat(scssSelector1, scssSelector2).By;
//        }
//
//        public static By GetBy(string scssSelector) {
//            return ScssBuilder.CreateBy(scssSelector);
//        }
        public static bool Equals(Scss x, Scss y)
        {
            if (Object.ReferenceEquals(x, y))
            {
                return(true);
            }

            return(x != null && y != null &&
                   string.Equals(x.Css, y.Css) && string.Equals(x.Xpath, y.Xpath) &&
                   x.CombineWithRoot == y.CombineWithRoot);
        }