예제 #1
0
파일: Kernel.cs 프로젝트: EasyPaul/Cosmos
        protected override void Run()
        {
            try
            {
                mDebugger.Send("Run");

                StringTest.Execute();
                ByteTest.Execute();
                SByteTest.Execute();
                Int16Test.Execute();
                UInt16Test.Execute();
                Int32Test.Execute();
                UInt32Test.Execute();
                Int64Test.Execute();
                UInt64Test.Execute();
                CharTest.Execute();
                BooleanTest.Execute();
                SingleTest.Execute();
                BitConverterTest.Execute();
                DoubleTest.Execute();
                DecimalTest.Execute();
                System.Collections.Generic.ListTest.Execute();
                System.Collections.Generic.QueueTest.Execute();
                System.DelegatesTest.Execute();
                System.UInt64Test.Execute();
                TestController.Completed();
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception occurred");
                Console.WriteLine(e.Message);
                mDebugger.Send("Exception occurred: " + e.Message);
                TestController.Failed();
            }
        }
예제 #2
0
 public void TestSetup()
 {
     this.uut = new BooleanTest
     {
         HiddenValue    = true,
         NotHiddenValue = true
     };
 }
예제 #3
0
파일: Kernel.cs 프로젝트: zawhtut/Cosmos
        protected override void Run()
        {
            try
            {
                mDebugger.Send("Run");

                // C#
                WhileLoopTests.Execute();
                ForeachLoopTests.Execute();

                // System
                ObjectTests.Execute();
                ArrayTests.Execute();
                StringTest.Execute();
                ByteTest.Execute();
                SByteTest.Execute();
                Int16Test.Execute();
                UInt16Test.Execute();
                Int32Test.Execute();
                UInt32Test.Execute();
                Int64Test.Execute();
                UInt64Test.Execute();
                CharTest.Execute();
                BooleanTest.Execute();
                SingleTest.Execute();
                DoubleTest.Execute();
                MathTest.Execute();
                ConvertTests.Execute();

                //mDebugger.Send("Thread test start of 500 ms");
                //ThreadTest.Execute();
                //mDebugger.Send("Thread test end");

                //DecimalTest.Execute();
                BitConverterTest.Execute();
                UnsafeCodeTest.Execute();
                DelegatesTest.Execute();
                RandomTests.Execute();

                // System.Collections.Generic
                ListTest.Execute();
                QueueTest.Execute();
                DictionaryTest.Execute();

                // System.Text
                EncodingTest.Execute();

                TestController.Completed();
            }
            catch (Exception e)
            {
                mDebugger.Send("Exception occurred: " + e.Message);
                mDebugger.Send(e.Message);
                Console.WriteLine("Exception occurred");
                Console.WriteLine(e.Message);
                TestController.Failed();
            }
        }
예제 #4
0
        public void Can_Deserialize_Boolean_From_String()
        {
            string       xmlpath  = this.PathFor("boolean_from_string.xml");
            XDocument    doc      = XDocument.Load(xmlpath);
            RestResponse response = new RestResponse {
                Content = doc.ToString()
            };
            XmlDeserializer d      = new XmlDeserializer();
            BooleanTest     output = d.Deserialize <BooleanTest>(response);

            Assert.True(output.Value);
        }
예제 #5
0
        public void TestBooleanDatabaseConversion_ShouldConvertCorrectly()
        {
            var booleanTest = new BooleanTest();

            connection.ExecuteNonQueryString("CREATE TABLE BOOLEAN_TEST (boolean_value NUMBER, long_value NUMBER)");

            connection.ExecuteNonQueryStringForObject <BooleanTest>("INSERT INTO BOOLEAN_TEST (boolean_value, long_value) VALUES (@boolean_value, @long_value)", booleanTest);

            var actualTest = connection.GetSingleObjectFromQueryString <BooleanTest>("SELECT * FROM BOOLEAN_TEST");

            Assert.Equal(booleanTest.BooleanValue, actualTest.BooleanValue);
            Assert.True(actualTest.BooleanValue);
            Assert.Equal(123, actualTest.LongValue);
        }
예제 #6
0
        protected override void Run()
        {
            try
            {
                mDebugger.Send("Run");

                CSharp.WhileLoopTests.Execute();
                CSharp.ForeachLoopTests.Execute();

                //ObjectTests.Execute(); Stack corruption on method Clone()
                ArrayTests.Execute();
                StringTest.Execute();
                ByteTest.Execute();
                SByteTest.Execute();
                Int16Test.Execute();
                UInt16Test.Execute();
                Int32Test.Execute();
                UInt32Test.Execute();
                Int64Test.Execute();
                UInt64Test.Execute();
                CharTest.Execute();
                BooleanTest.Execute();
                SingleTest.Execute();
                DoubleTest.Execute();
                MathTest.Execute();
                //DecimalTest.Execute();
                BitConverterTest.Execute();
                UnsafeCodeTest.Execute();
                DelegatesTest.Execute();

                System.Collections.Generic.ListTest.Execute();
                System.Collections.Generic.QueueTest.Execute();
                //System.Collections.Generic.DictionaryTest.Execute();

                TestController.Completed();
            }
            catch (Exception e)
            {
                mDebugger.Send("Exception occurred: " + e.Message);
                mDebugger.Send(e.Message);
                Console.WriteLine("Exception occurred");
                Console.WriteLine(e.Message);
                TestController.Failed();
            }
        }