public void CanGetRandomGatePosition() { List <GatePosition> list = new List <GatePosition>(); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); list.Add(GatePositionHelper.GetRandomGatePosition()); GatePosition p1 = list.First(); Assert.IsFalse(list.All(x => x == p1)); }
/// <summary> /// Create a new instance of <see cref="IGatedNode"/> with <see cref="GatedNode"/> with a random gate position. /// </summary> /// <returns></returns> public IGatedNode NewGatedNode() { return(new GatedNode(GatePositionHelper.GetRandomGatePosition())); }