wsdapi/tests: Add test for endpoint reference "any" parameter.

Signed-off-by: Owen Rudge <orudge@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Owen Rudge 2018-04-23 21:12:07 +01:00 committed by Alexandre Julliard
parent 7a04404797
commit e7a5fc50dc
1 changed files with 8 additions and 3 deletions

View File

@ -513,12 +513,13 @@ static void Publish_tests(void)
HRESULT rc;
ULONG ref;
char *msg;
WSDXML_ELEMENT *header_any_element, *body_any_element;
WSDXML_ELEMENT *header_any_element, *body_any_element, *endpoint_any_element;
WSDXML_NAME header_any_name;
WSDXML_NAMESPACE ns;
WCHAR header_any_name_text[] = {'B','e','e','r',0};
static const WCHAR header_any_text[] = {'P','u','b','l','i','s','h','T','e','s','t',0};
static const WCHAR body_any_text[] = {'B','o','d','y','T','e','s','t',0};
static const WCHAR endpoint_any_text[] = {'E','n','d','P','T','e','s','t',0};
static const WCHAR uri[] = {'h','t','t','p',':','/','/','w','i','n','e','.','t','e','s','t','/',0};
static const WCHAR prefix[] = {'w','i','n','e',0};
@ -595,12 +596,16 @@ static void Publish_tests(void)
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, body_any_text, &body_any_element);
ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
rc = WSDXMLBuildAnyForSingleElement(&header_any_name, endpoint_any_text, &endpoint_any_element);
ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
/* Publish the service */
rc = IWSDiscoveryPublisher_PublishEx(publisher, publisherIdW, 1, 1, 1, sequenceIdW, NULL, NULL, NULL,
header_any_element, NULL, NULL, NULL, body_any_element);
header_any_element, NULL, NULL, endpoint_any_element, body_any_element);
WSDFreeLinkedMemory(header_any_element);
WSDFreeLinkedMemory(body_any_element);
WSDFreeLinkedMemory(endpoint_any_element);
ok(rc == S_OK, "Publish failed: %08x\n", rc);
@ -617,7 +622,7 @@ static void Publish_tests(void)
/* Verify we've received a message */
ok(msgStorage->messageCount >= 1, "No messages received\n");
sprintf(endpointReferenceString, "<wsa:EndpointReference><wsa:Address>%s</wsa:Address></wsa:EndpointReference>", publisherId);
sprintf(endpointReferenceString, "<wsa:EndpointReference><wsa:Address>%s</wsa:Address><wine:Beer>EndPTest</wine:Beer></wsa:EndpointReference>", publisherId);
sprintf(app_sequence_string, "<wsd:AppSequence InstanceId=\"1\" SequenceId=\"%s\" MessageNumber=\"1\"></wsd:AppSequence>",
sequenceId);