示例#1
0
 public void TestInitialize()
 {
     _view   = new AnyForm();
     _button = new Button();
     _view.Controls.Add(_button);
     _metric = new ClickMetric(_button);
 }
示例#2
0
        public void GetView_ControlThatIsAForm_ReturnThatControl()
        {
            // Arrange
            var formControl = new AnyForm();

            // Act
            var form = formControl.GetView();

            // Assert
            form.Should().BeEquivalentTo(formControl);
        }
示例#3
0
        public void GetView_ControlWhoseParentIsAForm_ReturnParent()
        {
            // Arrange
            var formControl = new AnyForm();
            var button      = new Button();

            formControl.Controls.Add(button);

            // Act
            var form = button.GetView();

            // Assert
            form.Should().BeEquivalentTo(button.Parent);
        }
 public void TestInitialize()
 {
     _view   = new AnyForm();
     _metric = new ViewEnteredMetric <AnyFormViewModel>(_view);
 }