本文整理汇总了C#中Transition.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# Transition.Equals方法的具体用法?C# Transition.Equals怎么用?C# Transition.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transition
的用法示例。
在下文中一共展示了Transition.Equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Transition_Equals_CustomGuardSame_SameProps_ReturnsTrue
public void Transition_Equals_CustomGuardSame_SameProps_ReturnsTrue()
{
Func<StubStateModel, bool> guard = m => true;
var t1 = new Transition<StubStateModel>(new Trigger("t1"), new State<StubStateModel>("s1"), new State<StubStateModel>("s2"), guard);
var t2 = new Transition<StubStateModel>(new Trigger("t1"), new State<StubStateModel>("s1"), new State<StubStateModel>("s2"), guard);
Assert.True(t1.Equals(t2));
}
示例2: Transition_Equals_NoGuardOnEither_SameProps_ReturnsTrue
public void Transition_Equals_NoGuardOnEither_SameProps_ReturnsTrue()
{
var t1 = new Transition<StubStateModel>(new Trigger("t1"), new State<StubStateModel>("s1"), new State<StubStateModel>("s2"));
var t2 = new Transition<StubStateModel>(new Trigger("t1"), new State<StubStateModel>("s1"), new State<StubStateModel>("s2"));
Assert.True(t1.Equals(t2));
}
示例3: Transition_Equals_CustomGuardDiff_SameProps_ReturnsFalse
public void Transition_Equals_CustomGuardDiff_SameProps_ReturnsFalse()
{
var t1 = new Transition<StubStateModel>(new Trigger("t1"), new State<StubStateModel>("s1"), new State<StubStateModel>("s2"), m => false);
var t2 = new Transition<StubStateModel>(new Trigger("t1"), new State<StubStateModel>("s1"), new State<StubStateModel>("s2"), m => true);
Assert.False(t1.Equals(t2));
}