public void ShouldThrowExceptionWhenActionIsNull()
            {
                var richMenuArea = new RichMenuArea();

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

                ExceptionAssert.Throws <InvalidOperationException>("The bounds cannot be null.", () =>
                {
                    RichMenuArea.Convert(richMenuArea);
                });
            }
            public void ShouldPreserveInstanceWhenValueIsRichMenuArea()
            {
                var richMenuArea = new RichMenuArea()
                {
                    Action = new MessageAction(),
                    Bounds = new RichMenuBounds(),
                };

                var convertedRichMenuArea = RichMenuArea.Convert(richMenuArea);

                Assert.AreSame(convertedRichMenuArea, richMenuArea);
            }
            public void ShouldConvertCustomIRichMenuBoundsToRichMenuBounds()
            {
                var richMenuArea = new TestRichMenuArea()
                {
                    Action = new TestMessageAction(),
                    Bounds = new TestRichMenuBounds()
                };

                var area = RichMenuArea.Convert(richMenuArea);

                Assert.AreNotSame(richMenuArea, area);
                Assert.AreNotSame(richMenuArea.Action, area.Action);
                Assert.AreNotSame(richMenuArea.Bounds, area.Bounds);
            }