示例#1
0
            public void ShouldThrowExceptionWhenActionIsNull()
            {
                var richMenuArea = new RichMenuArea();

                ExceptionAssert.Throws <InvalidOperationException>("The action cannot be null.", () =>
                {
                    richMenuArea.Validate();
                });
            }
示例#2
0
            public void ShouldThrowExceptionWhenBoundsIsNull()
            {
                var richMenuArea = new RichMenuArea()
                {
                    Action = new MessageAction()
                };

                ExceptionAssert.Throws <InvalidOperationException>("The bounds cannot be null.", () =>
                {
                    richMenuArea.Validate();
                });
            }
示例#3
0
            public void ShouldThrowExceptionWhenActionIsInvalid()
            {
                var richMenuArea = new RichMenuArea()
                {
                    Action = new MessageAction(),
                    Bounds = new RichMenuBounds()
                };

                ExceptionAssert.Throws <InvalidOperationException>("The label cannot be null.", () =>
                {
                    richMenuArea.Validate();
                });
            }
示例#4
0
            public void ShouldThrowExceptionWhenBoundsIsInvalid()
            {
                var richMenuArea = new RichMenuArea()
                {
                    Action = new MessageAction()
                    {
                        Label = "Foo", Text = "Bar"
                    },
                    Bounds = new RichMenuBounds()
                };

                ExceptionAssert.Throws <InvalidOperationException>("The width is not set.", () =>
                {
                    richMenuArea.Validate();
                });
            }