本文整理汇总了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());
}
示例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);
}
示例3: Compare
public dynamic Compare(string urlA, string urlB, bool persist)
{
var qBSvc = new Service();
return qBSvc.Compare(urlA, urlB, persist);
}