public void SetUp() { time = new Time(); var config = new Config(); timeout = config.TimeBeforeEmptyAck; instance1 = new AckTestInstance(); instance1.connection = new SubIRawConnection(); instance1.ackSystem = new AckSystem(instance1.connection, config, MAX_PACKET_SIZE, time, bufferPool); instance2 = new AckTestInstance(); instance2.connection = new SubIRawConnection(); instance2.ackSystem = new AckSystem(instance2.connection, config, MAX_PACKET_SIZE, time, bufferPool); badSocket = new BadSocket(instance1, instance2); // create and send n messages instance1.messages = new List <byte[]>(); instance2.messages = new List <byte[]>(); receives1 = new List <byte[]>(); receives2 = new List <byte[]>(); }
public void TearDown() { time = null; badSocket = null; instance1 = null; instance2 = null; receives1 = null; receives2 = null; System.GC.Collect(); }