Exemplo n.º 1
0
        //[Test]
        public void CanCompareTwoUrls()
        {
            //Arrange
            var urlbaseline = "www.ancestry.com";
            var urldelta = "www.ancestry.com";

            //Act
            var qbService = new Service();
            var tmpComparison = qbService.Compare(urlbaseline, urldelta).First();

            //Assert

            Assert.IsFalse(String.IsNullOrEmpty(tmpComparison.IdString), "Comparison Id is Null or Empty: {0}", tmpComparison.Id.ToString());
        }
Exemplo n.º 2
0
 public void RunComparisonUsingGrid()
 {
     var _service = new Service();
     var rA = new Request
     {
         BoundingRectangle = new Rectangle(0, 0, 0, 0),
         Browser = "firefox",
         BrowserVersion = "10.1",
         ExcludeJquerySelector = "",
         IncludeJquerySelector = "body*",
         Id = new ObjectId(),
         Path = new StringAsReference(),
         Script = "",
         Url = "http://www.google.com/"
     };
     var rB = new Request
     {
         BoundingRectangle = new Rectangle(0, 0, 0, 0),
         Browser = "firefox",
         BrowserVersion = "10.1",
         ExcludeJquerySelector = "",
         IncludeJquerySelector = "body*",
         Id = new ObjectId(),
         Path = new StringAsReference(),
         Script = "",
         Url = "http://www.ancestry.com/"
     };
     var comparison = _service.Compare(rA, rB,false);
     Assert.NotNull(comparison[0]);
     Assert.NotNull(comparison[0].Scrapes);
     Assert.IsTrue(comparison[0].Scrapes.Length > 1);
     Assert.NotNull(comparison[0].Result);
     Assert.NotNull(comparison[0].Id);
     Assert.NotNull(comparison[0].IdString);
     Assert.NotNull(comparison[0].TimeStamp);
 }
Exemplo n.º 3
0
        public dynamic Compare(string urlA, string urlB, bool persist)
        {
            var qBSvc = new Service();

            return qBSvc.Compare(urlA, urlB, persist);
        }