public void ShouldNothrowExceptionWhenWidthPlusValueIs2500() { var richMenuBounds = new RichMenuBounds(); richMenuBounds.Width = 2300; richMenuBounds.X = 200; }
public void ShouldNotThrowExceptionWhenValueIs0() { var richMenuBounds = new RichMenuBounds() { X = 0 }; Assert.AreEqual(0, richMenuBounds.X); }
public void ShouldNotThrowExceptionWhenValueIs1() { var richMenuBounds = new RichMenuBounds() { Width = 1 }; Assert.AreEqual(1, richMenuBounds.Width); }
public void ShouldNotThrowExceptionWhenValueIs1686() { var richMenuBounds = new RichMenuBounds() { Y = 1686 }; Assert.AreEqual(1686, richMenuBounds.Y); }
public void ShouldThrowExceptionWhenWidthIsNotSet() { var richMenuBounds = new RichMenuBounds(); ExceptionAssert.Throws <InvalidOperationException>("The width is not set.", () => { richMenuBounds.Validate(); }); }
public void ShouldNothrowExceptionWhenHeightPlusValueIs2500() { var richMenuBounds = new RichMenuBounds() { Height = 1486, Y = 200 }; Assert.AreEqual(200, richMenuBounds.Y); Assert.AreEqual(1486, richMenuBounds.Height); }
public void ShouldThrowExceptionWhenHeightPlusValueIsBiggerThan1686() { var richMenuBounds = new RichMenuBounds(); richMenuBounds.Height = 1487; ExceptionAssert.Throws <InvalidOperationException>("The vertical postion and height will exceed the rich menu's max height.", () => { richMenuBounds.Y = 200; }); }
public void ShouldNotThrowExceptionWhenValuePlusYIs1686() { var richMenuBounds = new RichMenuBounds() { Y = 200, Height = 1486 }; Assert.AreEqual(200, richMenuBounds.Y); Assert.AreEqual(1486, richMenuBounds.Height); }
public void ShouldNotThrowExceptionWhenValuePlusXIs2500() { var richMenuBounds = new RichMenuBounds() { X = 200, Width = 2300 }; Assert.AreEqual(200, richMenuBounds.X); Assert.AreEqual(2300, richMenuBounds.Width); }
public void ShouldThrowExceptionWhenValuePlusXIsBiggerThan2500() { var richMenuBounds = new RichMenuBounds(); richMenuBounds.X = 200; ExceptionAssert.Throws <InvalidOperationException>("The horizontal postion and width will exceed the rich menu's max width.", () => { richMenuBounds.Width = 2301; }); }
public void ShouldConvertCustomIRichMenuBoundsToRichMenuBounds() { var richMenuBounds = new TestRichMenuBounds(); var bounds = RichMenuBounds.Convert(richMenuBounds); Assert.AreNotSame(bounds, richMenuBounds); Assert.AreEqual(1, bounds.X); Assert.AreEqual(2, bounds.Y); Assert.AreEqual(3, bounds.Width); Assert.AreEqual(4, bounds.Height); }
public void ShouldThrowExceptionWhenHeightIsNotSet() { var richMenuBounds = new RichMenuBounds() { Width = 100 }; ExceptionAssert.Throws <InvalidOperationException>("The height is not set.", () => { RichMenuBounds.Convert(richMenuBounds); }); }
public void ShouldPreserveInstanceWhenValueIsRichMenuBounds() { var richMenuBounds = new RichMenuBounds() { Width = 1, Height = 1 }; var convertedRichMenuBounds = RichMenuBounds.Convert(richMenuBounds); Assert.AreSame(richMenuBounds, convertedRichMenuBounds); }
public void ShouldNotThrowExceptionWhenValueIsNotNull() { var richMenuBounds = new RichMenuBounds { Height = 200, Width = 200, X = 100, Y = 0 }; var richMenuArea = new RichMenuArea { Bounds = richMenuBounds }; Assert.AreEqual(richMenuBounds, richMenuArea.Bounds); }
public void ShouldThrowExceptionWhenValueIsLessThan1() { var richMenuBounds = new RichMenuBounds(); ExceptionAssert.Throws <InvalidOperationException>("The width cannot be less than 1.", () => { richMenuBounds.Width = 0; }); }
public void ShouldThrowExceptionWhenValueIsLessThan0() { var richMenuBounds = new RichMenuBounds(); ExceptionAssert.Throws <InvalidOperationException>("The horizontal position cannot be less than 0.", () => { richMenuBounds.X = -1; }); }
public void ShouldThrowExceptionWhenValueIsBiggerThan1686() { var richMenuBounds = new RichMenuBounds(); ExceptionAssert.Throws <InvalidOperationException>("The vertical position cannot be bigger than 1686.", () => { richMenuBounds.Y = 1687; }); }
public void ShouldThrowExceptionWhenValueIsBiggerThan2500() { var richMenuBounds = new RichMenuBounds(); ExceptionAssert.Throws <InvalidOperationException>("The width cannot be bigger than 2500.", () => { richMenuBounds.Width = 2501; }); }