public void Should_throw_for_async_void_send() { Should.Throw <InvalidOperationException>(() => _mediator.SendAsync(new AsyncVoidPing())); }
public void Non_digits_is_invalid() { Should.Throw <OriginatorException>(() => Originator.AsPhoneNumber("123A45")) .ErrorCode.ShouldBe(OriginatorErrorCode.NonNumeric); }
public void Empty_is_invalid() { Should.Throw <OriginatorException>(() => Originator.AsShortCode(string.Empty)) .ErrorCode.ShouldBe(OriginatorErrorCode.Empty); }
public void Twelve_digits_is_invalid() { Should.Throw <OriginatorException>(() => Originator.AsAlpha("AbCZz12h39QX")) .ErrorCode.ShouldBe(OriginatorErrorCode.TooLong); }
public void Leading_zero_is_invalid() { Should.Throw <OriginatorException>(() => Originator.AsPhoneNumber("0123")) .ErrorCode.ShouldBe(OriginatorErrorCode.LeadingZero); }
private void ExecuteUsingReflectingScanners() { var ex = Should.Throw<Exception>(() => Sut.Execute(ThrowingMethods.When, false)); ex.GetType().FullName.ShouldContain("Inconclusive"); }
public void When_creating_batch_from_list_with_buckets_of_size_zero() => Should.Throw <ArgumentOutOfRangeException>(() => new List <int>().Batch(0).ToArray()) .Message.ShouldBe("Specified argument was out of the range of valid values. (Parameter 'size')");
public void FailIfDiscriminatorIsTooLong() { configuration.UseTypeMapper(new OtherTypeMapper(string.Join("", Enumerable.Repeat("A", 1025)))); Should.Throw <InvalidOperationException>(() => configuration.Document <Entity>()); }
public void coerces_input_to_exception(string input) { FormatException formatException = Should.Throw<FormatException>(() => type.ParseValue(input)); formatException.Message.ShouldBe("String was not recognized as a valid Boolean."); }
public void FailWhenTryingtoOverrideIdProjection() { Should.Throw <ArgumentException>(() => configuration.Document <Entity>().With("Id", x => x.String)); }
public void FailsIfEntityTypeIsUnknown() { Should.Throw <HybridDbException>(() => configuration.GetDesignFor <int>()); }
public void FailWhenSettingTypeMapperTooLate() { configuration.Document <Entity>(); Should.Throw <InvalidOperationException>(() => configuration.UseTypeMapper(new OtherTypeMapper("MySiscriminator"))); }
public void FailsWhenTryingToAddNewTableAfterInitialize() { configuration.Initialize(); Should.Throw <InvalidOperationException>(() => configuration.GetOrCreateDesignFor(typeof(OtherEntity), "allnewtable")); }
public void RegisterBaseTypeAfterDerivedTypeBeforeInitialize() { configuration.Document <MoreDerivedEntity1>(); Should.Throw <InvalidOperationException>(() => configuration.Document <DerivedEntity>()); }
public void parsing_a_null_address_will_throw() { Should.Throw<ArgumentNullException>(() => Address.ParseFormatName(null)); }
public void Test001() { var cut = RenderComponent <Wrapper>(); Should.Throw <ElementNotFoundException>(() => cut.Find("div")); }
private void ExecuteUsingFluentScanner() { var ex = Should.Throw<Exception>(() => Sut.Execute(ThrowingMethods.When, true)); ex.GetType().FullName.ShouldContain("Inconclusive"); }
public void Throws_if_collection_is_null(IList <int> collection) { Should.Throw <ArgumentNullException>(() => collection.Shuffle()); }
public override void Page_ForPocoSqlWithOrderByParameterPageItemAndPerPage_ShouldReturnValidPocoCollection() { Should.Throw <NotSupportedException>(() => base.Page_ForPocoGivenSqlWithoutOrderByParameterPageItemAndPerPage_ShouldReturnValidPocoCollection()); }
public void Throws_if_iterations_is_less_than_one(IList <int> collection) { Should.Throw <ArgumentOutOfRangeException>(() => collection.Shuffle(0)); Should.Throw <ArgumentOutOfRangeException>(() => collection.Shuffle(-1)); }
public void Null_is_invalid() { Should.Throw <ArgumentNullException>(() => Originator.AsPhoneNumber(null)); }
public void GetNextHost_LocalhostFallbackOff_AfterRefreshNoEndpoints_Throws() { CreatePool("host1, host2, host3"); ChangeConfig(""); Should.Throw <EnvironmentException>(() => Pool.GetNextHost()); }
public void Non_Supported_chars_when_strict_is_invalid() { Should.Throw <OriginatorException>(() => Originator.AsAlpha("Café", true)) .ErrorCode.ShouldBe(OriginatorErrorCode.UnsupportedChars); }
public void CombineWithNullSecondThrows() { Should.Throw <ArgumentNullException>(() => Validator.Combine <IValidator <int> >(null, null)); }
public void Sixteen_digits_is_invalid() { Should.Throw <OriginatorException>(() => Originator.AsPhoneNumber("1234567890123456")) .ErrorCode.ShouldBe(OriginatorErrorCode.TooLong); }
public void parsing_a_wrong_formatname_will_throw() { Should.Throw<InvalidOperationException>(() => Address.ParseFormatName("[email protected]")); }
public void Null_is_invalid() { Should.Throw <ArgumentNullException>(() => Originator.AsShortCode(null)); }
public void parsing_an_empty_address_will_throw() { Should.Throw<InvalidOperationException>(() => Address.ParseFormatName("")); }
public void RemountImageTest_ThrowsDirectoryNotFoundException_mountPath() { Should.Throw <DirectoryNotFoundException>(() => WimgApi.RemountImage(Path.Combine(TestDirectory, Guid.NewGuid().ToString()))); }
public void Should_throw_for_send() { Should.Throw <InvalidOperationException>(() => _mediator.Send(new Ping())); }