DataCollectorTests CollectTonsOfDataInOneChunk Method Delta Engine Documentation

Namespace: DeltaEngine.Networking.Tests.Tcp
Assembly: DeltaEngine.Networking.Tests (in DeltaEngine.Networking.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void CollectTonsOfDataInOneChunk()
Examples

[Test]
public void CollectTonsOfDataInOneChunk()
{
    var dataCollector = new DataCollector();
    dataCollector.ObjectFinished += container => collectedDataObjects.Add(container);
    Assert.IsEmpty(collectedDataObjects);
    var hugeByteArray = GetTestBytesWithLengthHeader(9348);
    dataCollector.ReadBytes(hugeByteArray, 0, hugeByteArray.Length);
    Assert.AreEqual(1, collectedDataObjects.Count);
}
See Also