Esempio n. 1
0
            public void ShouldNotThrowExceptionWhenValid()
            {
                IAction action = new MessageAction()
                {
                    Text  = "Foo",
                    Label = "Test"
                };

                action.Validate();
            }
Esempio n. 2
0
            public void ShouldThrowExceptionWhenTextIsNull()
            {
                IAction action = new MessageAction()
                {
                    Label = "Test"
                };

                ExceptionAssert.Throws <InvalidOperationException>("The text cannot be null.", () =>
                {
                    action.Validate();
                });
            }
Esempio n. 3
0
            public void ShouldThrowExceptionWhenLabelIsNull()
            {
                IAction action = new MessageAction()
                {
                    Text = "Foo"
                };

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