示例#1
0
    IEnumerator DoTest(TestStuff aTest)
    {
        TestsCompleted[aTest.name] = false;

        lbl.Text = aTest.name + " Test Begun";
        // This tweening will be buggy.
        if(!tweener.IsPlaying) {
            tweener.Play();
        }
        float t = 0;
        while(t <= 2.5f) {
            t += Time.deltaTime;
            yield return 0;
        }
        if(!reverseTweener.IsPlaying) {
            reverseTweener.Play();
        }
        yield return new WaitForSeconds(aTest.length - t);
        TestsCompleted[aTest.name] = true;
        lbl.Text = aTest.name + " Results Available. Please click on test to view results.";
        // This tweening will be buggy.
        if(!tweener.IsPlaying) {
            tweener.Play();
        }
        yield return new WaitForSeconds(4.5f);
        if(!reverseTweener.IsPlaying) {
            reverseTweener.Play();
        }
    }
示例#2
0
        public void ConvertToArrayOfNullable()
        {
            TestStuff stuff = JsonValue.StringToObject <TestStuff>(@"{ ""NullableIntsField"": [ 1, 2, 3, 4 ], ""NullableIntsProperty"": [ 5, 6, 7, 8 ] }");

            Assert.NotNull(stuff.NullableIntsField);
            Assert.NotNull(stuff.NullableIntsProperty);
            Assert.Equal(new int?[] { 1, 2, 3, 4 }, stuff.NullableIntsField);
            Assert.Equal(new int?[] { 5, 6, 7, 8 }, stuff.NullableIntsProperty);
        }
示例#3
0
        static void Main(string[] args)
        {
            try
            {
                var connection = System.Configuration.ConfigurationManager.ConnectionStrings["Test"].ConnectionString;

                Console.WriteLine(connection);
                var retval = new DataTable();
                retval = Dal.GetADataTable(connection);

                if ((args.Count() > 1) && args.Contains("-input"))
                {
                    // run sql from file.
                    string fn = args[1];
                    TestStuff.createDatFilesFromSql(connection, fn);
                    Console.WriteLine(String.Join(", ", args));
                }
                else
                {
                    TestSerialize(retval);
                }

                //Data data = new Data();
                //data.MakeDataTables();

                //DataSet ds = data.dataSet;
                //ds.Tables[0].Rows[0].SetField(1, "FUHello Mercurial CI");
                //Console.WriteLine("serial in");

                // serialize
                //string set = "what the ddddd";
                //byte[] content = Serialize(set);
                //byte[] content = Serialize(ds);

                //File.WriteAllBytes(".\\out.ds2.dat", content);
                //byte[] dat = File.ReadAllBytes(".\\out.ds.dat");
                //DataSet ds3 = DeSerialize(dat);

                //DataSet ds2 = DeSerialize(content);
                //string val = ds2.Tables[0].Rows[0][1].ToString();
                //Console.WriteLine("serial out {0}", val);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                throw;
            }
        }