Esempio n. 1
0
        public void Test_Adapters()
        {
            AdapterA adapterA = new AdapterA(new OtherProduct());

            adapterA.Update(12f, 12f);
            Assert.Equal(12f, adapterA.GetHeight());
            AdapterB adapterB = new AdapterB(new Product());

            adapterB.Update(55f, 55f);
            Assert.Equal(55f, adapterB.GetHeight());
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            AdapterA adapterA = new AdapterA(new OtherProduct());

            adapterA.Update(12f, 12f);
            Console.WriteLine(adapterA.GetHeight());


            AdapterB adapterB = new AdapterB(new Product());

            adapterB.Update(55f, 55f);
            Console.WriteLine(adapterB.GetHeight());
        }