コード例 #1
0
 public void ControlWithEverything()
 {
     var testingControl = new TestingControl();
     testingControl.Click += TestingListener.StandardCallback;
     testingControl.Click += TestingListener.AnotherStandardCallback;
     testingControl.MyEvent += TestingListener.StandardCallback;
     testingControl.MyEvent += TestingListener.AnotherStandardCallback;
     testingControl.KeyEvent += TestingListener.StandardCallback;
     testingControl.KeyEvent += TestingListener.AnotherStandardCallback;
     EventApprovals.VerifyEvents(testingControl);
 }
コード例 #2
0
        public void ControlWithEverything()
        {
            var testingControl = new TestingControl();

            testingControl.Click    += TestingListener.StandardCallback;
            testingControl.Click    += TestingListener.AnotherStandardCallback;
            testingControl.MyEvent  += TestingListener.StandardCallback;
            testingControl.MyEvent  += TestingListener.AnotherStandardCallback;
            testingControl.KeyEvent += TestingListener.StandardCallback;
            testingControl.KeyEvent += TestingListener.AnotherStandardCallback;
            EventApprovals.VerifyEvents(testingControl);
        }
コード例 #3
0
 public void ControlWithEverything()
 {
     using (ApprovalTests.Namers.ApprovalResults.UniqueForOs()) {
         var testingControl = new TestingControl();
         testingControl.Click    += TestingListener.StandardCallback;
         testingControl.Click    += TestingListener.AnotherStandardCallback;
         testingControl.MyEvent  += TestingListener.StandardCallback;
         testingControl.MyEvent  += TestingListener.AnotherStandardCallback;
         testingControl.KeyEvent += TestingListener.StandardCallback;
         testingControl.KeyEvent += TestingListener.AnotherStandardCallback;
         EventApprovals.VerifyEvents(testingControl);
     }
 }
コード例 #4
0
        public void ControlWithEverything()
        {
			using(ApprovalTests.Namers.ApprovalResults.UniqueForOs()) {
				var testingControl = new TestingControl();
				testingControl.Click += TestingListener.StandardCallback;
				testingControl.Click += TestingListener.AnotherStandardCallback;
				testingControl.MyEvent += TestingListener.StandardCallback;
				testingControl.MyEvent += TestingListener.AnotherStandardCallback;
				testingControl.KeyEvent += TestingListener.StandardCallback;
				testingControl.KeyEvent += TestingListener.AnotherStandardCallback;
				EventApprovals.VerifyEvents(testingControl);
			}
        }