public void Init() { Logger.Clear(); inputStream = EventTestingUtilities.BuildStream(ExpectedID); goalComs.SetStream(inputStream); pickupEvent = new PickupEvent(); }
public void Init() { int objectID = 43; //Dummy exitInputStream = EventTestingUtilities.BuildStream(); putDownInputStream = EventTestingUtilities.BuildStream(); goToInputStream = EventTestingUtilities.BuildStream(0, objectID, 0); pickupInputStream = EventTestingUtilities.BuildStream(objectID); haltInputStream = EventTestingUtilities.BuildStream(); invalidInputStream = EventTestingUtilities.BuildStream(-1); invalidEventCode = 99; }
/// <summary> /// Creates a stream and fill it with data. /// </summary> /// <param name="input">Data which will be writen into the stream.</param> /// <returns>A new communication stream.</returns> public static CommunicationStream BuildStream(params int[] input) { MemoryStream mem = new MemoryStream(); CommunicationStream com = new CommunicationStream(mem); foreach (int i in input) { com.WriteInt(i); } mem.Position = 0; //Bring the seeker back to the start. return com; }
public void SetUp() { mem = new MemoryStream(); stream = new CommunicationStream(mem); coms = new GoalComsStub(stream); }
public void initOnce() { emptyStream = EventTestingUtilities.BuildStream(); goalComs = new GoalComsStub(emptyStream); }
public void SetStream(CommunicationStream coms) { this.coms = coms; }
public GoalComsStub(CommunicationStream coms) : base("127.0.0.1", 0) { this.coms = coms; GoalCommunicator.Instance = this; }
public override void Initialize() { stream = new CommunicationStream(internalStream); }