本文整理汇总了C#中BlueSpider.Blob.Basic.Network.AdjList.BasicAdjList.IsEdge方法的典型用法代码示例。如果您正苦于以下问题:C# BasicAdjList.IsEdge方法的具体用法?C# BasicAdjList.IsEdge怎么用?C# BasicAdjList.IsEdge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BlueSpider.Blob.Basic.Network.AdjList.BasicAdjList
的用法示例。
在下文中一共展示了BasicAdjList.IsEdge方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsEdge_Throws_When_NullPassed_In_For_Source_Node
public void IsEdge_Throws_When_NullPassed_In_For_Source_Node()
{
var net = new BasicAdjList(Guid.NewGuid());
INode nodeA = null;
INode nodeB = net.CreateNode();
var ex = Assert.Throws<ArgumentNullException>(() => net.IsEdge(nodeA, nodeB));
}
示例2: IsEdge_Throws_When_Invalid_Type_Passed_In_For_Dest_Node
public void IsEdge_Throws_When_Invalid_Type_Passed_In_For_Dest_Node()
{
var net = new BasicAdjList(Guid.NewGuid());
INode nodeA = net.CreateNode();
INode nodeB = new DummyBasicNode();
var ex = Assert.Throws<ArgumentException>(() => net.IsEdge(nodeA, nodeB));
}
示例3: IsEdge_ReturnsTrueIfEdgeExistsBetweenTwoNodes
public void IsEdge_ReturnsTrueIfEdgeExistsBetweenTwoNodes()
{
//Arrange
var net = new BasicAdjList(Guid.NewGuid());
INode nodeA = net.CreateNode();
INode nodeB = net.CreateNode();
IEdge edge = net.CreateEdge(nodeA, nodeB);
bool result = net.IsEdge(nodeA, nodeB);
Assert.True(result);
}
示例4: IsEdge_ReturnsTrueFor_Self_Looped_Edges
public void IsEdge_ReturnsTrueFor_Self_Looped_Edges()
{
//Arrange
var net = new BasicAdjList(Guid.NewGuid());
INode nodeA = net.CreateNode();
INode nodeB = net.CreateNode();
IEdge edge = net.CreateEdge(nodeB, nodeB);
bool result = net.IsEdge(nodeB, nodeB);
Assert.True(result);
}
示例5: IsEdge_ReturnsFalseIf_Nodes_AreReversedButEdgeExists
public void IsEdge_ReturnsFalseIf_Nodes_AreReversedButEdgeExists()
{
//Arrange
var net = new BasicAdjList(Guid.NewGuid());
INode nodeA = net.CreateNode();
INode nodeB = net.CreateNode();
IEdge edge = net.CreateEdge(nodeA, nodeB);
bool result = net.IsEdge(nodeB, nodeA);
Assert.False(result);
}
示例6: IsEdge_ReturnsFalseIfEdgeDNE
public void IsEdge_ReturnsFalseIfEdgeDNE()
{
//Arrange
var net = new BasicAdjList(Guid.NewGuid());
INode nodeA = net.CreateNode();
INode nodeB = net.CreateNode();
INode nodeC = net.CreateNode();
IEdge edge = net.CreateEdge(nodeA, nodeB);
bool result = net.IsEdge(nodeC, nodeA);
Assert.False(result);
}