当前位置: 首页>>代码示例>>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;未经允许,请勿转载。