public Canoa()
 {
     propulsao = new Remo();
 }
    public int RunTest()
    {
        try
        {
            object    t      = null;
            string    s      = (string)t;
            AppDomain domain = AppDomain.CreateDomain("testdomain");
            Remo      server = (Remo)domain.CreateInstanceAndUnwrap(typeof(Test).Assembly.FullName, "Remo");
            if (System.Threading.Thread.GetDomainID() == server.GetDomainId())
            {
                throw new TestException("Object not created in new domain", 1);
            }

            Dada d = new Dada();
            d.p = 22;

            server.Run();
            server.Run2(88, "hola");
            server.Run3(99, d, "adeu");

            string r = server.Run4(200, d, "que");
            CheckValue(r, "vist", 140);

            try
            {
                server.Run5(200, d, "que");
                throw new TestException("Exception expected", 150);
            }
            catch (Exception ex)
            {
                CheckValue(ex.Message, "peta", 151);
            }

            Dada d2;
            d = server.Run6(99, out d2, "adeu");
            CheckValue(d.p, 987, 161);
            CheckValue(d2.p, 987, 162);

            d.p = 22;
            d2  = server.Run7(d);
            CheckValue(d.p, 22, 170);
            CheckValue(d2.p, 33, 170);

            byte[] ba = new byte[5];
            for (byte n = 0; n < ba.Length; n++)
            {
                ba [n] = n;
            }

            server.Run8(ba);

            for (int n = 0; n < ba.Length; n++)
            {
                CheckValue(ba[n], (byte)(ba.Length - n), 180);
            }

            StringBuilder sb = new StringBuilder("un");
            server.Run9(sb);
            Test.CheckValue(sb, new StringBuilder("un"), 190);
        }
        catch (TestException ex)
        {
            Console.WriteLine("TEST ERROR ({0}): {1}", ex.Code, ex);
            return(ex.Code);
        }
        catch (Exception ex)
        {
            Console.WriteLine("TEST ERROR: " + ex);
            return(-1);
        }
        return(0);
    }
 public Jangada()
 {
     propulsao = new Remo();
 }