當前位置: 首頁>>代碼示例>>C#>>正文


C# Test.Run方法代碼示例

本文整理匯總了C#中System.Test.Run方法的典型用法代碼示例。如果您正苦於以下問題:C# Test.Run方法的具體用法?C# Test.Run怎麽用?C# Test.Run使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Test的用法示例。


在下文中一共展示了Test.Run方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: DollarSignInAssertForPropertyGetters

 public void DollarSignInAssertForPropertyGetters()
 {
     var t = new Test {
         Member = "QuickTest.Tests.RunTests+Person.Personality",
         ThisString = "{ Personality:20 }",
         AssertString = "$ > 15 && $ < 30",
         TestType = TestType.PropertyGetter,
     };
     t.Run ();
     Assert.AreEqual (TestResult.Pass, t.Result, t.FailInfo);
 }
開發者ID:jorik041,項目名稱:QuickTest,代碼行數:11,代碼來源:RunTests.cs

示例2: ProcedureAssert

 public void ProcedureAssert()
 {
     var t = new Test {
         Member = "QuickTest.Tests.RunTests+Person.LowerCase",
         ThisString = "{ FirstName: \"Frank\", LastName:\"Krueger\" }",
         AssertString = "FullName == \"frank krueger\"",
         TestType = TestType.Procedure,
     };
     t.Run ();
     Assert.AreEqual (TestResult.Pass, t.Result, t.FailInfo);
 }
開發者ID:jorik041,項目名稱:QuickTest,代碼行數:11,代碼來源:RunTests.cs

示例3: ObjectLiteralArgs

 public void ObjectLiteralArgs()
 {
     var t = new Test {
         Member = "QuickTest.Tests.RunTests+Person.SetLocation",
         ThisString = "{ FirstName: \"Frank\", LastName:\"Krueger\" }",
         AssertString = "Location.Lat == 1.0",
         TestType = TestType.Procedure,
     };
     t.Arguments.Add (new TestArgument { Name = "loc", ValueString = "{Lat=1,Lon=2}", ValueType = "QuickTest.Tests.RunTests+Location", });
     t.Run ();
     Assert.AreEqual (TestResult.Pass, t.Result, t.FailInfo);
 }
開發者ID:jorik041,項目名稱:QuickTest,代碼行數:12,代碼來源:RunTests.cs

示例4: Main

 static void Main()
 {
     using (var game = new Test())
         game.Run();
 }
開發者ID:ravikamath,項目名稱:CPI311,代碼行數:5,代碼來源:Program.cs

示例5: PropertyGetterBadAssert

 public void PropertyGetterBadAssert()
 {
     var t = new Test {
         Member = "QuickTest.Tests.RunTests+Person.FullName",
         ThisString = "{ FirstName: \"Frank\", LastName:\"Krueger\" }",
         AssertString = "FullName == \"Frank Krueger\" && FirstName == \"Foo\"",
         TestType = TestType.PropertyGetter,
     };
     t.Run ();
     Assert.AreEqual (TestResult.Fail, t.Result, t.FailInfo);
     Assert.AreEqual ("Assert Fail", t.FailInfo);
 }
開發者ID:jorik041,項目名稱:QuickTest,代碼行數:12,代碼來源:RunTests.cs

示例6: PropertySetterAssert

 public void PropertySetterAssert()
 {
     var t = new Test {
         Member = "QuickTest.Tests.RunTests+Person.FirstName",
         ThisString = "{ FirstName: \"Frank\", LastName:\"Krueger\" }",
         AssertString = "FullName == \"Alva Krueger\"",
         TestType = TestType.PropertySetter,
     };
     t.Arguments.Add (new TestArgument { Name = "value", ValueString = "\"Alva\"", ValueType = "System.String" });
     t.Run ();
     Assert.AreEqual (TestResult.Pass, t.Result, t.FailInfo);
 }
開發者ID:jorik041,項目名稱:QuickTest,代碼行數:12,代碼來源:RunTests.cs

示例7: PropertyGetterUnknown

 public void PropertyGetterUnknown()
 {
     var t = new Test {
         Member = "QuickTest.Tests.RunTests+Person.FullName",
         ThisString = "{ FirstName: \"Frank\", LastName:\"Krueger\" }",
         TestType = TestType.PropertyGetter,
     };
     t.Run ();
     Assert.AreEqual (TestResult.Unknown, t.Result, t.FailInfo);
 }
開發者ID:jorik041,項目名稱:QuickTest,代碼行數:10,代碼來源:RunTests.cs

示例8: PropertyGetterBadExpected

 public void PropertyGetterBadExpected()
 {
     var t = new Test {
         Member = "QuickTest.Tests.RunTests+Person.FullName",
         ThisString = "{ FirstName: \"Frank\", LastName:\"Krueger\" }",
         TestType = TestType.PropertyGetter,
         ExpectedValueString = "Frank A. Krueger",
     };
     t.Run ();
     Assert.AreEqual (TestResult.Fail, t.Result);
     Assert.AreEqual ("Expected Value Fail", t.FailInfo);
 }
開發者ID:jorik041,項目名稱:QuickTest,代碼行數:12,代碼來源:RunTests.cs

示例9: Main

        /// <summary>
        /// Programmets startpunkt.
        /// </summary>
        static void Main()
        {
            bool exit = false;
            NoiseObjectType type = NoiseObjectType.Indefinite;

            do
            {
                switch (GetMenuChoice())
                {
                    case 0:
                        exit = true;
                        continue;

                    case 1:
                        type = NoiseObjectType.Cat;
                        break;

                    case 2:
                        type = NoiseObjectType.Dog;
                        break;

                    case 3:
                        type = NoiseObjectType.Car;
                        break;

                    case 4:
                        Console.Clear();
                        Test test = new Test();
                        test.Run();
                        continue;

            #if DEBUG
                    default:
                        Debug.Assert(false, "Hantering av menyalternativet saknas.");
                        continue;
            #endif
                }

                Console.Clear();
                INoise noise = CreateNoiseObject(type);
                noise.MakeNoise();
                ContinueOnKeyPressed();
            } while (!exit);
        }
開發者ID:,項目名稱:,代碼行數:47,代碼來源:


注:本文中的System.Test.Run方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。