Exemplo n.º 1
0
            public void ShouldThrowExceptionWhenLabelIsNull()
            {
                IAction action = new DateTimePickerAction(DateTimePickerMode.Date);

                ExceptionAssert.Throws <InvalidOperationException>("The label cannot be null.", () =>
                {
                    action.Validate();
                });
            }
Exemplo n.º 2
0
            public void ShouldNotThrowExceptionWhenValid()
            {
                IAction action = new DateTimePickerAction(DateTimePickerMode.Date)
                {
                    Label = "Foo",
                    Data  = "Bar"
                };

                action.Validate();
            }
Exemplo n.º 3
0
            public void ShouldThrowExceptionWhenDataIsNull()
            {
                IAction action = new DateTimePickerAction(DateTimePickerMode.Date)
                {
                    Label = "PostbackLabel"
                };

                ExceptionAssert.Throws <InvalidOperationException>("The data cannot be null.", () =>
                {
                    action.Validate();
                });
            }