Last active
August 29, 2015 14:20
-
-
Save cmatskas/64aec6048d18fa14283f to your computer and use it in GitHub Desktop.
WCF Custom Message handler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using APIConsumerServices.Services.CustomService; | |
using FluentAssertions; | |
using NUnit.Framework; | |
namespace APIConsumerServices.Services.Tests | |
{ | |
[TestFixture] | |
public class CallServiceTest | |
{ | |
// CustomClient is the wrapper around the WSDL generated proxy class | |
var testservice = new CustomClient(endpointname, endpoint); | |
var requestInterceptor = new CustomInspectorBehavior(); | |
testservice.Endpoint.Behaviors.Add(requestInterceptor); | |
testservice.Open(); | |
var channel = testservice.ChannelFactory.CreateChannel(endpoint); | |
var request = testservice.CreateCustomRequest(); | |
var response = channel.SomeAbritraryMethod(request); | |
response.Should().NotBeNull("Results were returned successfully"); | |
testservice.Close(); | |
} | |
} |
added .cs file extension
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changed language to C#