public void ShouldThrowExceptionWhenSizeIsInvalid() { var richMenu = new RichMenu() { Areas = new[] { new RichMenuArea() { Action = new MessageAction() { Label = "Foo", Text = "Bar" }, Bounds = new RichMenuBounds(1, 2, 3, 4) } }, ChatBarText = "foobar", Name = "barfoo", Size = new RichMenuSize() }; ExceptionAssert.Throws <InvalidOperationException>("The height is not set.", () => { richMenu.Validate(); }); }
public void ShouldThrowExceptionWhenAreasIsNull() { var richMenu = new RichMenu(); ExceptionAssert.Throws <InvalidOperationException>("The areas cannot be null.", () => { richMenu.Validate(); }); }
public void ShouldThrowExceptionWhenChatBarTextIsNull() { var richMenu = new RichMenu() { Areas = new RichMenuArea[1] }; ExceptionAssert.Throws <InvalidOperationException>("The chat bar text cannot be null.", () => { richMenu.Validate(); }); }
public void ShouldThrowExceptionWhenNameIsNull() { var richMenu = new RichMenu() { Areas = new RichMenuArea[1], ChatBarText = "foobar" }; ExceptionAssert.Throws <InvalidOperationException>("The name cannot be null.", () => { richMenu.Validate(); }); }
public void ShouldThrowExceptionWhenAreasIsInvalid() { var richMenu = new RichMenu() { Areas = new[] { new RichMenuArea() }, ChatBarText = "foobar", Name = "barfoo", Size = new RichMenuSize() }; ExceptionAssert.Throws <InvalidOperationException>("The action cannot be null.", () => { richMenu.Validate(); }); }
public void ShouldThrowExceptionWhenAreasHasNullValue() { var richMenu = new RichMenu() { Areas = new RichMenuArea[1], ChatBarText = "foobar", Name = "barfoo", Size = new RichMenuSize() }; ExceptionAssert.Throws <InvalidOperationException>("The rich menu area should not be null.", () => { richMenu.Validate(); }); }