public void HostedCacheServer_PchcServer_MessageHeader_TypeInvalid()
{
CheckApplicability();
PCHCClient pchcClient = new PCHCClient(
TransferProtocol.HTTPS,
testConfig.HostedCacheServerComputerName,
testConfig.HostedCacheServerHTTPSListenPort,
PchcConsts.HttpsUrl,
testConfig.DomainName,
testConfig.UserName,
testConfig.UserPassword);
BaseTestSite.Log.Add(
LogEntryKind.Debug,
"Send message with invalid message type to hosted cache server");
var initialOffer = pchcClient.CreateInitialOfferMessage(
testConfig.ClientContentRetrievalListenPort,
new byte[0]);
initialOffer.MsgHeader.MsgType = (PCHC_MESSAGE_TYPE)0xFEFE;
bool passed = false;
try
{
pchcClient.SendInitialOfferMessage(initialOffer);
}
catch
{
passed = true;
}
BaseTestSite.Assert.IsTrue(passed, "Hosted cache server should drop message with invalid message type");
}