public void HostedCacheServer_PchcServer_SegmentInfo_HashAlgoInvalid()
{
CheckApplicability();
var contentInformation = contentInformationUtility.CreateContentInformationV1();
using (var pccrrServer = new PccrrServer(testConfig.ClientContentRetrievalListenPort))
{
pccrrServer.StartListening();
pccrrServer.MessageArrived += new MessageArrivedEventArgs(delegate(IPEndPoint sender, PccrrPacket pccrrPacket)
{
BaseTestSite.Assert.Fail("Hosted cache server should not retrieve content information with invalid hash algorithm");
});
PCHCClient pchcClient = new PCHCClient(
TransferProtocol.HTTPS,
testConfig.HostedCacheServerComputerName,
testConfig.HostedCacheServerHTTPSListenPort,
PchcConsts.HttpsUrl,
testConfig.DomainName,
testConfig.UserName,
testConfig.UserPassword);
var segmentInfo = pchcClient.CreateSegmentInfoMessage(
testConfig.ClientContentRetrievalListenPort,
contentInformation,
0);
segmentInfo.SegmentInfo.dwHashAlgo = (dwHashAlgo_Values)0xFEFE;
var segmentInfoResponse = pchcClient.SendSegmentInfoMessage(segmentInfo);
BaseTestSite.Assert.AreEqual(
RESPONSE_CODE.OK,
segmentInfoResponse.ResponseCode,
"Hosted cache server should return OK to segment info message");
Thread.Sleep(testConfig.NegativeTestTimeout);
}
}