public static int Main() { Test <C> (null) (new C()); Test2(new C()) (); Test <C> (null) (new C()); Test4(new C()) (); return(0); }
void m1() { int i1; Color c1; Test2 t2; Test3 t3; Test4 t4; Object o1; J j1; Object[] ao1; // Need a type to create objects. i1 = new Color.Red(); // Cannot instantiate interfaces or abstract classes. j1 = new J(); t3 = new Test3(); // The type must be a class or value type. ao1 = new Object[] (); // Inaccessible constructor. t4 = new Test4(); // No candidates. t2 = new Test2(0.1); }
static void Main2(string[] args) { Test test = new Test(); Test2 test2 = new Test2(); Test3 test3 = new Test3(); Console.WriteLine(test.Power(10)); Console.WriteLine(test.Power(20)); Console.WriteLine(test2.Multi(52, 273)); Console.WriteLine(test2.Multi(103, 32)); test3.Print(); test3.Print(); Test4 test4 = new Test4(); Console.WriteLine(test4.Sum(1, 100)); Test5 test5 = new Test5(); Console.WriteLine(test5.Multiply(1, 10)); Random random = new Random(); Console.WriteLine(random.Next(10, 100)); Console.WriteLine(random.Next(10, 100)); Console.WriteLine(random.Next(10, 100)); Console.WriteLine(random.Next(10, 100)); Console.WriteLine(random.Next(10, 100)); Console.WriteLine(random.Next(10, 100)); }
public virtual void Init(RichTextBox outputText) { m_output_text = outputText; // clear log File.WriteAllText(m_log_path, String.Empty); Test1 testCase1 = new Test1(); m_tests.Add(testCase1); Test2 testCase2 = new Test2(); m_tests.Add(testCase2); Test3 testCase3 = new Test3(); m_tests.Add(testCase3); Test4 testCase4 = new Test4(); m_tests.Add(testCase4); Test5 testCase5 = new Test5(); m_tests.Add(testCase5); Test6 testCase6 = new Test6(); m_tests.Add(testCase6); }
void Direct() { t1 = GetComponent <Test1>(); t2 = GetComponent <Test2>(); t3 = GetComponent <Test3>(); t4 = GetComponent <Test4>(); t5 = GetComponent <Test5>(); }
static int Main() { return(100 + (Test1.Run() == 0 ? 0 : 1) + (Test2.Run() == 1 ? 0 : 2) + (Test3.Run() == 0 ? 0 : 4) + (Test4.Run() == 0 ? 0 : 8)); }
public void TestMemberImpl() { Test4 t = TypeAccessor <Test4> .CreateInstance(); t.Test.Name = "John"; Assert.AreEqual("John", t.Test.Name); }
public void TestToInstance() { var test4 = new Test4(); Container.BindIFactory <Test4>().ToInstance(test4); Assert.IsNotNull(ReferenceEquals(test4, Container.Resolve <IFactory <Test4> >().Create())); }
static void Main(string[] args) { var tst = new Test4 { BaseUrl = "ss" }; var s = Assembly.GetEntryAssembly().GetCustomAttributes(); System.Console.ReadLine(); }
static void Main(string[] args) { var test4 = new Test4 { BirthDate = DateTime.UtcNow }; var a = Boolean.Parse("das"); // bool test; // var bbb = Boolean.TryParse("asdas", out test); if (Boolean.TryParse("asdas", out var aaaaaaaa)) { // tests // test } //test4.BirthDate.Value. var test24 = new Test4(); // Test4.SuperAge ExtensionMethods.SuperMethod("asdas"); MySuperDelegate mySuperDelegate = TTTT; mySuperDelegate += TTTT2; mySuperDelegate?.Invoke(("asd")); mySuperDelegate += g => { System.Console.WriteLine("BU"); return(0); }; var items = new[] { "asd", "asdas" }; var ittems2 = items.Where(items => items.Length > 2); ittems2.ToList(); "".SuperMethod(); var test2 = new System.Collections.Generic.List <int>(); test2.Where(i => true); //var a = Test1(5); var a2 = Test1(b: 5, a: 7); var ab = Test1(5.5); Console.WriteLine("Hello World!"); var test = new Test(55); var b = test as ITest; test.TestMethod3(); }
public static void Main() { ITest test1 = new Test1(); ITest test2 = new Test2(); ITest test3 = new Test3(); ITest test4 = new Test4(); System.Console.WriteLine(test1.A()); System.Console.WriteLine(test2.A()); System.Console.WriteLine(test3.A()); System.Console.WriteLine(test4.A()); }
public static void Main() { ITest test1 = new Test1(); ITest test2 = new Test2(); ITest test3 = new Test3(); ITest test4 = new Test4(); System.Console.WriteLine(test1.A()); System.Console.WriteLine(test2.A()); System.Console.WriteLine(test3.A()); System.Console.WriteLine(test4.A()); }
public void GivenTest4_generatesExpectedResult() { var tst4 = new Test4(); var ctxt = (CTextBlock)tst4.Content; var info = new MetryHolder(ctxt, 1000, 1000); Approvals.Verify( new ApprovalImageWriter(info.Image), Approvals.GetDefaultNamer(), new DiffToolReporter(DiffEngine.DiffTool.WinMerge)); }
static int Main() { bool passed = true; ulong result1 = Test1.Run(); ulong expectedResult1 = 64537; if (result1 != expectedResult1) { passed = false; Console.WriteLine(String.Format("Failed Test1: expected = {0}, actual = {1}", expectedResult1, result1)); } S0 vr45 = new S0(0, 0, 0); int result2 = Test2.Run(vr45); int expectedResult2 = 65487; if (result2 != expectedResult2) { passed = false; Console.WriteLine(String.Format("Failed Test2: expected = {0}, actual = {1}", expectedResult2, result2)); } int result3 = Test3.Run(); int expectedResult3 = 65535; if (result3 != expectedResult3) { passed = false; Console.WriteLine(String.Format("Failed Test3: expected = {0}, actual = {1}", expectedResult3, result3)); } uint result4 = Test4.Run(); uint expectedResult4 = 32779; if (result4 != expectedResult4) { passed = false; Console.WriteLine(String.Format("Failed Test4: expected = {0}, actual = {1}", expectedResult4, result4)); } if (passed) { Console.WriteLine("PASSED"); return(100); } else { Console.WriteLine("FAILED"); return(-1); } }
public void TestExecute4() { dynamic param = JObject.FromObject(new { age = 1, name = "rea", jobs = new List <string> { "developer", "support", "mathematichian" } }); Test4 result = actionManager.ExecuteStoredProc <Test4>("yari_test_1", ResultType.MultipleArrays, param); Assert.IsNotNull(result); }
static void Main() { Test0.Test(new string[0]); Console.WriteLine(); Test1.Test(new string[0]); Console.WriteLine(); Test2.Test(); Console.WriteLine(); Test3.Test(); Console.WriteLine(); Test4.Test(); Console.WriteLine(); Console.ReadKey(); }
public void Deep_Clone_Typed_Array_Property() { var test1 = new Test4 { MyTest1 = new[] { new Test1(), new Test1() } }; var clone = (Test4)test1.DeepClone(); Assert.AreNotSame(test1, clone); Assert.AreEqual(test1.MyTest1.Length, clone.MyTest1.Length); for (var i = 0; i < test1.MyTest1.Length; i++) { Assert.IsNotNull(clone.MyTest1.ElementAt(i)); Assert.AreNotSame(clone.MyTest1.ElementAt(i), test1.MyTest1.ElementAt(i)); } }
static void Main() { Test0.Test(); Console.WriteLine(); Test1.Test(); Console.WriteLine(); Test2.Test(); Console.WriteLine(); Test3.Test(); Console.WriteLine(); Test4.Test(); Console.WriteLine(); Test5.Test(); Console.WriteLine(); Test6.Test(); Console.WriteLine(); Console.ReadKey(); }
static void Main() { /* * Test1 a = new Test1(); * //line 23 error - 'Test1' is an ambiguous reference between 'NameSpaceTest1.Test1' and 'NameSpaceTest2.Test1' * a.Testfunc(); */ Test4 b = new Test4(); b.TestFun4(); // op- Test Fun 4 Test12 a = new Test12(); a.Testfunc(); // op- Test Fun 12 Test21 c = new Test21(); c.Testfunc(); // op- Test Fun 21 }
public void Get_ClassWithAllAttributes_Parsed() { var test = new Test4 { Property1 = 1M, Property2 = "val", Property3 = _now, Property4 = "p4", Property5 = "p5", Property6 = "p6" }; var outDic = _digger.Get(test); Assert.That(outDic.Count, Is.EqualTo(3)); Assert.That(outDic[MixpanelProperty.DistinctId].PropertyNameSource, Is.EqualTo(PropertyNameSource.MixpanelName)); Assert.That(outDic[MixpanelProperty.DistinctId].Value, Is.EqualTo(1M)); Assert.That(outDic["property3"].PropertyNameSource, Is.EqualTo(PropertyNameSource.DataMember)); Assert.That(outDic["property3"].Value, Is.EqualTo(_now)); Assert.That(outDic["Property6"].PropertyNameSource, Is.EqualTo(PropertyNameSource.Default)); Assert.That(outDic["Property6"].Value, Is.EqualTo("p6")); }
static void Test1() { var temp = new Test(Matts); var temp2 = new Test2(Matts); Console.WriteLine(temp2("test")); Test2 temp3 = Matts; Console.WriteLine(temp3("test")); Test2 temp4 = (string whatever) => whatever; Console.WriteLine(temp4("test11")); Test3 temp5 = () => { Console.WriteLine("first"); }; temp5 += delegate { Console.WriteLine("ehh1"); }; { Console.WriteLine("ehh2"); }; { Console.WriteLine("ehh3"); }; temp5 += () => { Console.WriteLine("ehhh6"); }; temp5(); Test4 temp6 = delegate { Console.WriteLine("test4"); }; temp6(1, "dfdf"); }
public Test4 Loopback(Test4 input) => input;
private Task Handle(Test4 e) { return(Task.CompletedTask); }
public static int Main() { Test1.Test(); if (Utils.failures == 0) { Console.WriteLine("Test1 OK"); } Test2.Test(); if (Utils.failures == 0) { Console.WriteLine("Test2 OK"); } Test3.Test(); if (Utils.failures == 0) { Console.WriteLine("Test3 OK"); } Test4.Test(); if (Utils.failures == 0) { Console.WriteLine("Test4 OK"); } Test5.Test(); if (Utils.failures == 0) { Console.WriteLine("Test5 OK"); } Test6.Test(); if (Utils.failures == 0) { Console.WriteLine("Test6 OK"); } Test7.Test(); if (Utils.failures == 0) { Console.WriteLine("Test7 OK"); } Test8.Test(); if (Utils.failures == 0) { Console.WriteLine("Test8 OK"); } Test9.Test(); if (Utils.failures == 0) { Console.WriteLine("Test9 OK"); } Test10.Test(); if (Utils.failures == 0) { Console.WriteLine("Test10 OK"); } Test11.Test(); if (Utils.failures == 0) { Console.WriteLine("Test11 OK"); } Test12.Test(); if (Utils.failures == 0) { Console.WriteLine("Test12 OK"); } Test13.Test(); if (Utils.failures == 0) { Console.WriteLine("Test13 OK"); } Test14.Test(); if (Utils.failures == 0) { Console.WriteLine("Test14 OK"); } Test15.Test(); if (Utils.failures == 0) { Console.WriteLine("Test15 OK"); } Test16.Test(); if (Utils.failures == 0) { Console.WriteLine("Test16 OK"); } Test17.Test(); if (Utils.failures == 0) { Console.WriteLine("Test17 OK"); } Test18.Test(); if (Utils.failures == 0) { Console.WriteLine("Test18 OK"); } Test19.Test(); if (Utils.failures == 0) { Console.WriteLine("Test19 OK"); } Test20.Test(); if (Utils.failures == 0) { Console.WriteLine("Test20 OK"); } Test21.Test(); if (Utils.failures == 0) { Console.WriteLine("Test21 OK"); } Test22.Test(); if (Utils.failures == 0) { Console.WriteLine("Test22 OK"); } Test23.Test(); if (Utils.failures == 0) { Console.WriteLine("Test23 OK"); } if (Utils.failures > 0) { return(101); } else { Console.WriteLine("PASS"); return(100); } }
public void Initialize(Test4 other) { this.Other = other; }
private Task Conflict(Test4 e) { return(Task.CompletedTask); }
public Test2(Test3 test3, Test4 test4) { }
public void Initialize(Test4 other) { this.Other = other; }