public void LoadPageThrowsIfPageNumberIsLessThanOne() { // Arrange PackagesTreeNodeBase node = CreatePackagesTreeNodeBase(); // Act & Assert ExceptionAssert.ThrowsArgOutOfRange(() => node.LoadPage(0), "pageNumber", 1, null, true); }
public void ThrowsIfMaxLengthIsLessThan6() { // Act & Assert ExceptionAssert.ThrowsArgOutOfRange(() => PathHelper.SmartTruncate("", 5), "maxWidth", 6, null, true); ExceptionAssert.ThrowsArgOutOfRange(() => PathHelper.SmartTruncate("", -4), "maxWidth", 6, null, true); }
public void ConstructorRequiresNonNegativeOldPosition() { ExceptionAssert.ThrowsArgOutOfRange(() => new TextChange(-1, 0, new Mock <ITextBuffer>().Object, 0, 0, new Mock <ITextBuffer>().Object), "oldPosition", 0, null, true); }
public void ConstructorThrowsWhenWidthIsLessThanZero() { ExceptionAssert.ThrowsArgOutOfRange(() => { new Chart(GetContext(), GetVirtualPathProvider(), -1, 100); }, "width", 0, null, true); }
public void ConstructorRequiresNonNegativeNewLength() { ExceptionAssert.ThrowsArgOutOfRange(() => new TextChange(0, 0, new Mock <ITextBuffer>().Object, 0, -1, new Mock <ITextBuffer>().Object), "newLength", 0, null, true); }