Ejemplo n.º 1
0
        public void ClickingButton()
        {
            var sut = new Button();

            for (int i = 0; i < 10; i++)
            {
                var veryFirst = GC.GetTotalMemory(true);
                for (int j = 0; j < 500; j++)
                {
                    sut.OnClick();
                }
                GC.Collect();
                var veryLast = GC.GetTotalMemory(true);

                Trace.WriteLine("*** veryFirst=" + veryFirst);
                Trace.WriteLine("*** veryLast =" + veryLast);
                var diff = veryLast - veryFirst;
                Trace.WriteLine("*** diff     =" + diff);
            }
        }
Ejemplo n.º 2
0
 public void Do()
 {
     var sut = new Button();
     sut.OnClick();
 }