当前位置: 首页>>代码示例>>C#>>正文


C# Service.Compare方法代码示例

本文整理汇总了C#中Service.Compare方法的典型用法代码示例。如果您正苦于以下问题:C# Service.Compare方法的具体用法?C# Service.Compare怎么用?C# Service.Compare使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Service的用法示例。


在下文中一共展示了Service.Compare方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CanCompareTwoUrls

        //[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());
        }
开发者ID:Ancestry,项目名称:quality-bot,代码行数:15,代码来源:ServiceTests.cs

示例2: RunComparisonUsingGrid

 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);
 }
开发者ID:Ancestry,项目名称:quality-bot,代码行数:36,代码来源:IntegrationTests.cs

示例3: Compare

        public dynamic Compare(string urlA, string urlB, bool persist)
        {
            var qBSvc = new Service();

            return qBSvc.Compare(urlA, urlB, persist);
        }
开发者ID:Ancestry,项目名称:quality-bot,代码行数:6,代码来源:QualityBotService.cs


注:本文中的Service.Compare方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。