示例#1
0
        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));
        }
示例#2
0
        public void ConsoleProxyFactory_Create_ReturnsNonNull()
        {
            var proxyFactory = new ConsoleProxyFactory(new ConsoleWriter());
            var subject      = new ProxySubject();
            var consoleProxy = proxyFactory.Create <IProxySubject>(subject);

            Assert.IsNotNull(consoleProxy);
        }
示例#3
0
        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);
        }