public void Cannot_Combine_Last_And_After() { ArgumentException argEx = null; try { GenerateConnection(5, last: 1, after: Cursor(1)); } catch (ArgumentException ex) { argEx = ex; } argEx.ShouldNotBeNull(); argEx?.Message.ShouldEqual("Cannot use `last` in conjunction with `after`."); }
public void Cannot_Combine_First_And_Before() { ArgumentException argEx = null; try { GenerateConnection(5, first: 1, before: Cursor(3)); } catch (ArgumentException ex) { argEx = ex; } argEx.ShouldNotBeNull(); argEx?.Message.ShouldEqual("Cannot use `first` in conjunction with `before`."); }
public void CombineFirstAndLast() { ArgumentException argEx = null; try { GenerateConnection(5, first: 1, last: 1); } catch (ArgumentException ex) { argEx = ex; } argEx.ShouldNotBeNull(); argEx?.Message.ShouldEqual("Cannot use `first` in conjunction with `last`."); }
public void CombineBeforeAndAfter() { ArgumentException argEx = null; try { GenerateConnection(5, before: Cursor(1), after: Cursor(1)); } catch (ArgumentException ex) { argEx = ex; } argEx.ShouldNotBeNull(); argEx?.Message.ShouldEqual("Cannot use `after` in conjunction with `before`."); }
public void ThrowsArgumentException_WhenArg_IsLessThanOne() { ArgumentException exception = null; try { var obj = new GenerateRandomSecretQuery(0); obj.ShouldBeNull(); } catch (ArgumentException ex) { exception = ex; } exception.ShouldNotBeNull(); // ReSharper disable PossibleNullReferenceException exception.ParamName.ShouldEqual("minimumLength"); // ReSharper restore PossibleNullReferenceException }
public void argument_exception_thrown() { _result.ShouldNotBeNull(); }
public void then_it_throws_an_exception() { _result.ShouldNotBeNull(); }