private void CallCheckUntypedAction(IOpActionReplyActionBehavior client) { Message clientMessage = Message.CreateMessage(MessageVersion.Soap11, "myAction2"); client.TestMethodUntypedAction(clientMessage); Assert.True(ValidateAction(@"myAction2")); }
public void OperationContractActionReplyActionBehaviorTests(string variation) { IWebHost host = ServiceHelper.CreateWebHostBuilder <Startup>(_output).Build(); using (host) { host.Start(); System.ServiceModel.BasicHttpBinding httpBinding = ClientHelper.GetBufferedModeBinding(); var factory = new System.ServiceModel.ChannelFactory <ClientContract.IOpActionReplyActionBehavior>(httpBinding, new System.ServiceModel.EndpointAddress(new Uri("http://localhost:8080/BasicWcfService/OpActionReplyActionBehaviorService.svc"))); IOpActionReplyActionBehavior channel = factory.CreateChannel(); switch (variation) { case "defaultaction": CallCheckDefaultAction(channel); break; case "defaultreplyaction": CallCheckDefaultReplyAction(channel); break; case "customaction": CallCheckCustomAction(channel); break; case "customreplyaction": CallCheckCustomReplyAction(channel); break; case "uriaction": CallCheckUriAction(channel); break; case "urireplyaction": CallCheckUriReplyAction(channel); break; case "emptyaction": CallCheckEmptyAction(channel); break; case "emptyreplyaction": CallCheckEmptyReplyAction(channel); break; case "untypedaction": CallCheckUntypedAction(channel); break; case "untypedreplyaction": CallCheckUntypedReplyAction(channel); break; default: break; } } }
private void CallCheckDefaultAction(IOpActionReplyActionBehavior client) { int id = 1; string name = "Default Action"; client.TestMethodCheckDefaultAction(id, name); Assert.True(ValidateAction(@"http://tempuri.org/IOpActionReplyActionBehavior/TestMethodCheckDefaultAction")); }
private void CallCheckEmptyReplyAction(IOpActionReplyActionBehavior client) { int id = 1; string name = "Empty ReplyAction"; int result = client.TestMethodCheckEmptyReplyAction(id, name); Assert.Equal(id + 1, result); }
private void CallCheckEmptyAction(IOpActionReplyActionBehavior client) { int id = 1; string name = "Empty Action"; client.TestMethodCheckEmptyAction(id, name); Assert.True(ValidateAction(@"empty action")); }
private void CallCheckUriAction(IOpActionReplyActionBehavior client) { int id = 1; string name = "Uri Action"; client.TestMethodCheckUriAction(id, name); Assert.True(ValidateAction(@"http://myAction")); }
private void CallCheckCustomAction(IOpActionReplyActionBehavior client) { int id = 1; string name = "Custom Action"; client.TestMethodCheckCustomAction(id, name); Assert.True(ValidateAction("myAction")); }
private void CallCheckUntypedReplyAction(IOpActionReplyActionBehavior client) { Message result = client.TestMethodCheckUntypedReplyAction(); Assert.NotNull(result); }