public void ConsoleProxyFactory_Create_ReturnsCorrectType() { var proxyFactory = new ConsoleProxyFactory(new ConsoleWriter()); var subject = new ProxySubject(); var consoleProxy = proxyFactory.Create <IProxySubject>(subject); Assert.IsInstanceOfType(consoleProxy, typeof(IProxySubject)); }
public void ConsoleProxyFactory_Create_ReturnsNonNull() { var proxyFactory = new ConsoleProxyFactory(new ConsoleWriter()); var subject = new ProxySubject(); var consoleProxy = proxyFactory.Create <IProxySubject>(subject); Assert.IsNotNull(consoleProxy); }
public void ConsoleProxyFactory_ProxyExecutesWithoutParam() { var proxyFactory = new ConsoleProxyFactory(new ConsoleWriter()); var subject = new ProxySubject(); var consoleProxy = proxyFactory.Create <IProxySubject>(subject); var value = consoleProxy.SkipMe(); Assert.AreEqual(ProxySubject.EchoValueConst, value); }