public void RDPEGFX_Segmentation_Negative_MultiSegmentNoSegmentArray()
{
this.TestSite.Log.Add(LogEntryKind.Comment, "Do capability exchange.");
RDPEGFX_CapabilityExchange();
this.TestSite.Log.Add(LogEntryKind.Comment, "Set the test type to {0}.", RdpegfxNegativeTypes.Segmentation_MultiSegments_WithoutSegmentArray);
this.rdpegfxAdapter.SetTestType(RdpegfxNegativeTypes.Segmentation_MultiSegments_WithoutSegmentArray);
this.TestSite.Log.Add(LogEntryKind.Comment, "Create a surface and fill it with green color.");
// Create & output a surface
RDPGFX_RECT16 surfRect = RdpegfxTestUtility.ConvertToRect(RdpegfxTestUtility.surfPos, RdpegfxTestUtility.surfWidth2, RdpegfxTestUtility.surfHeight2);
this.TestSite.Log.Add(LogEntryKind.Comment, "Create the first surface and map the surface to output");
Surface surf = this.rdpegfxAdapter.CreateAndOutputSurface(surfRect, PixelFormat.PIXEL_FORMAT_XRGB_8888);
this.TestSite.Assert.IsNotNull(surf, "Surface {0} is created", surf.Id);
// Send solid fill request to client to fill surface with green color
RDPGFX_RECT16 fillSurfRect = RdpegfxTestUtility.ConvertToRect(RdpegfxTestUtility.imgPos, RdpegfxTestUtility.surfWidth2, RdpegfxTestUtility.surfHeight2);
RDPGFX_RECT16[] fillRects = { fillSurfRect }; // Relative to surface
uint fid = this.rdpegfxAdapter.SolidFillSurface(surf, RdpegfxTestUtility.fillColorGreen, fillRects);
this.TestSite.Log.Add(LogEntryKind.Debug, "Surface is filled with solid color in frame: {0}", fid);
this.rdpegfxAdapter.ExpectFrameAck(fid);
// To be modified ....
this.TestSite.Log.Add(LogEntryKind.Comment, "Sending Encode Header/Data Messages to client.");
// byte compFlag = RdpSegmentedPdu.PACKET_COMPR_TYPE_RDP8 | RdpSegmentedPdu.PACKET_COMPRESSED;
byte compFlag = (byte)PACKET_COMPR_FLAG.PACKET_COMPR_TYPE_RDP8;
Image bgImage;
Image compImage = RdpegfxTestUtility.captureFromImage(image_64X64, RdpegfxTestUtility.imgPos,
RdpegfxTestUtility.ccLargeBandWidth, RdpegfxTestUtility.ccLargeBandHeight, out bgImage);
this.TestSite.Log.Add(LogEntryKind.Comment, "Send a large size bitmap using multipart datapacking but without SegmentArray field to the client for frame {0}.", fid);
fid = this.rdpegfxAdapter.SendUncompressedImage(compImage, RdpegfxTestUtility.imgPos.x, RdpegfxTestUtility.imgPos.y, surf.Id, PixelFormat.PIXEL_FORMAT_XRGB_8888, compFlag, RdpegfxTestUtility.segmentPartSize);
this.TestSite.Log.Add(LogEntryKind.Comment, "Expect SUT to drop the connection");
bool bDisconnected = this.rdpbcgrAdapter.WaitForDisconnection(waitTime);
this.TestSite.Assert.IsTrue(bDisconnected, "RDP client should terminate the connection when received an invalid message.");
}