Example #1
0
 public void Can_create_ruby_instance()
 {
     var dynamo = new Dynamo();
     dynamo.ExecuteRubyHost();
     IPerson person = dynamo.GetInstance<IPerson>("Person");
     person.greet();
     Assert.That(person != null);
 }
Example #2
0
        public void Can_query_bridged_types()
        {
            var dynamo = new Dynamo();
            dynamo.ExecuteRubyHost();
            var types = dynamo.GetInstanceNames();

            foreach (var bridge in types)
            {
                Console.Write(bridge);
            }

            Assert.That(types.Count() > 0);
        }
Example #3
0
        protected int ChkStaticValue;               // what is this for?

        public static int Main( String [] args)
        {
            int seed = (int)DateTime.Now.Ticks;
            if ( args.Length==3 )
            {
                if (!Int32.TryParse(args[2], out seed))
                {
                    // incorrect value passed to Dynamo
                    Usage();
                    return 1;
                }
            }
            else if ( args.Length!=2 ) {
                // incorrect number of parameters
                Usage();
                return 1;
            }

            Dynamo Mv_Dynamo;
            int numElements, numDynamics;

            if (!Int32.TryParse(args[0], out numElements) || !Int32.TryParse(args[1], out numDynamics))
            {
                Usage();
                return 1;
            }

            try
            {
                Mv_Dynamo = new Dynamo( numElements, numDynamics );
            } catch ( ArgumentException e) {
                // incorrect value passed to Dynamo
                Console.WriteLine("Dynamo: " + e.Message);
                return 1;
            }

            if ( Mv_Dynamo.RunTest(seed ))
                return 100; //pass

            return 1;   //fail
        }
Example #4
0
        public DynamoHost()
        {
            Dynamo = new Dynamo();

            New = Builder.New();
        }
Example #5
0
 public void Can_create_dynamo_instance()
 {
     var dynamo = new Dynamo();
     //dynamo.Should(Be.Not.Null);
     Assert.That(dynamo != null);
 }