Beispiel #1
0
            public void ShouldNotThrowExceptionWhenValid()
            {
                IAction action = new UriAction()
                {
                    Url   = new Uri("https://foo.bar"),
                    Label = "UriLabel"
                };

                action.Validate();
            }
Beispiel #2
0
            public void ShouldThrowExceptionWhenUriIsNull()
            {
                IAction action = new UriAction()
                {
                    Label = "UriLabel"
                };

                ExceptionAssert.Throws <InvalidOperationException>("The url cannot be null.", () =>
                {
                    action.Validate();
                });
            }
Beispiel #3
0
            public void ShouldThrowExceptionWhenLabelIsNull()
            {
                IAction action = new UriAction()
                {
                    Url = new Uri("https://foo.bar")
                };

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