Exemplo n.º 1
0
        public void AdapterTest()
        {
            var adaptee = new Adaptee();
            var target  = new Adapter.Adapter(adaptee);

            target.GetRequest().Should().Be(StructuralText.SpecificText);
        }
Exemplo n.º 2
0
        public void Main()
        {
            var     adaptee = new Adaptee();
            ITarget target  = new Adapter.Adapter(adaptee);

            Console.WriteLine("Adaptee interface is incompatible with the client.");
            Console.WriteLine("But with adapter client can call it's method.");

            Console.WriteLine(target.GetRequest());
        }