Created
January 28, 2016 19:16
-
-
Save vendettamit/cc67494895850d58c5f6 to your computer and use it in GitHub Desktop.
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
using SampleService.Contracts; | |
using WcfDynamicProxy.Tests.Helper; | |
using NUnit.Framework; | |
namespace WcfDynamicProxy.Tests.Tests | |
{ | |
/// <summary> | |
/// Implements the tests for CustomClientProxyFactory class. The tests have falvour of integration | |
/// as we're testing it on dummy service client. | |
/// </summary> | |
[TestFixture] | |
public class CustomClientProxyFactoryTest | |
{ | |
/// <summary> | |
/// Setup required before the tests of the fixture will run. | |
/// </summary> | |
[TestFixtureSetUp] | |
public void Init() | |
{ | |
ServiceHostProcessInvoker.InvokeDummyService(); | |
} | |
/// <summary> | |
/// Tear down to perform clean when the execution is finished. | |
/// </summary> | |
[TestFixtureTearDown] | |
public void TearDown() | |
{ | |
ServiceHostProcessInvoker.KillDummyService(); | |
} | |
/// <summary> | |
/// Case when the method GetDefaultErrorLoggingInterfaceProxy was invoked to get the real | |
/// proxy of a test service, succeeds. | |
/// </summary> | |
[Test] | |
public void GetDefaultWCFClientProxy_RequestingProxyClientGeneration_Succeeds() | |
{ | |
var proxy = DynamicProxyWrapperFactory.GetProxyInstanceByInterface<ITestService>("TestService"); | |
var result = proxy.SayHello(); | |
Assert.IsNotNull(result, "The result was null."); | |
Assert.IsNotEmpty(result, "The result was empty."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment