public void ValidStreet_For_MissingPostCode_Throw_MissingPostCode() { FluentActions.Invoking(() => new Address("Opole", "Prószkowska", null, 76)) .Should() .Throw <ArgumentException>(); }
public void ShouldThrowUnsupportedColourExceptionGivenNotSupportedColourCode() { FluentActions.Invoking(() => Colour.From("##FF33CC")) .Should().Throw <UnsupportedColourException>(); }
public void NotAllowNullInCreateTasks() { var sut = new TaskService(new FakeTaskApi(_testData)); FluentActions.Invoking(() => sut.CreateTasks(null)).Should().Throw <ArgumentNullException>(); }
public void SchemaGeneratorInstatiation() { FluentActions.Invoking(() => new SchemaWizard()) .Should() .NotThrow(); }
public void Should_throw_exception_if_negative_value(int min, int max) { FluentActions.Invoking(() => new DeliveryTime(min, max)).Should().Throw <NegativeDeliveryTimeException>(); }
public void AppleAuthClient_NotValidArgument_ThrowArgumentException(AppleAuthSetting authSetting, IAppleTokenGenerator privateKeySetting, HttpClient httpClient) { FluentActions.Invoking(() => new AppleAuthClient(authSetting, privateKeySetting, httpClient)).Should().Throw <ArgumentException>(); }
public void Throw_Error_AccountToTransfer_Is_Null() { FluentActions.Invoking(() => _sut.TransferMoney(Option.None <AccountToTransfer>())).Should() .Throw <ArgumentException>(); }
public async Task MustThrowWhenMessageHandlerIsInvokedAndRaisesException() { _serviceProvider.Setup(p => p.GetService(typeof(ICommandBehaviorPipeline <IMessage>))).Returns(null); _handler.Setup(p => p.Handle(It.IsAny <IMessage>(), It.IsAny <IMessageHandlerContext>())).Throws <Exception>(); await FluentActions.Invoking(async() => await _sut.Dispatch <IMessage>(null, null)).Should().ThrowAsync <Exception>(); }
public async Task MustThrowWhenCommandBehaviorPipelineIsExecutedAndRaisesException() { _pipeline.Setup(p => p.Execute(It.IsAny <IMessage>(), It.IsAny <IMessageHandlerContext>(), It.IsAny <IMessageHandler <IMessage> >())).Throws <Exception>(); await FluentActions.Invoking(async() => await _sut.Dispatch <IMessage>(null, null)).Should().ThrowAsync <Exception>(); }
public void Should_throw_exception_if_area_is_less_than_four() { FluentActions.Invoking(() => new Plateau(0, 2)).Should().Throw <InvalidPlateauSizeException>(); }
public void ImportCompleted() { FluentActions.Invoking(() => systemUnderTest.ImportCompleted()) .Should() .NotThrow(); }
public void Should_throw_exception_if_any_measurement_is_negative() { FluentActions.Invoking(() => new Plateau(-5, -5)).Should().Throw <InvalidPlateauSizeException>(); }
public static void RequestArgumentNull() => FluentActions .Invoking(() => ((IRequest <object>)null).WithQueryParams()) .Should() .Throw <ArgumentNullException>();
public void ValidPostCode_For_InvalidPostcode_Throw_InvalidPostcode(string postCode) { FluentActions.Invoking(() => new Address("Opole", "Prószkowska", postCode, 76)) .Should() .Throw <InvalidPostcode>(); }
public void ValidIfNameExist_When_NotExist_Should_Throw_MissingValueException(string name) { FluentActions.Invoking(() => new Room(_area, name, 1)) .Should() .Throw <MissingValueException>(); }
public async Task MustThrowIfExceptionIsRaisedGettingCommandBehaviorPipelineFromServiceProvider() { _serviceProvider.Setup(p => p.GetService(typeof(ICommandBehaviorPipeline <IMessage>))).Throws <Exception>(); await FluentActions.Invoking(async() => await _sut.Dispatch <IMessage>(null, null)).Should().ThrowAsync <Exception>(); }
public void ValidIfPeopleCapacityIsPositive_When_Not_Should_Throw_MissingValueException(int peopleCapacity) { FluentActions.Invoking(() => new Room(_area, "p1", peopleCapacity)) .Should() .Throw <HotelException>(); }
public void MustThrowWhenTypeIsClosedGenericWithMultipleGenericTypeParameters() { var sc = new ServiceCollection(); FluentActions.Invoking(() => sc.RegisterBehaviorForCommand(typeof(FakeCommandBehavior2 <FakeCommand, FakeCommand>))).Should().Throw <Exception>(); }
public void Throw_Error_MoneyToExtract_Is_Null() { FluentActions.Invoking(() => _sut.ExtractMoney(null, DateTime.Now)).Should() .Throw <ArgumentException>() .WithMessage("Debe ingresar un monto (Parameter 'moneyToExtract')"); }
public void MustThrowWhenTypeIsNotICommandBehavior() { var sc = new ServiceCollection(); FluentActions.Invoking(() => sc.RegisterBehaviorForCommand(typeof(FakeCommandBehavior3 <NotACommand>))).Should().ThrowExactly <ArgumentException>(); }
public void ListViewItemComparerInstantiation() { FluentActions.Invoking(() => new ListViewItemComparer()) .Should() .NotThrow(); }
public void MustThrowWhenTypeIsNull() { var sc = new ServiceCollection(); FluentActions.Invoking(() => sc.RegisterBehaviorForCommand(null)).Should().ThrowExactly <ArgumentNullException>(); }
public void Should_throw_exception_if_MinDeliveryWorkingDays_is_higher_than_MaxDeliveryWorkingDays() { FluentActions.Invoking(() => new DeliveryTime(5, 1)).Should().Throw <InvalidMinDeliveryTimeException>(); }
public void FromSymbol_WithInCorrectSymbol_ThrowsArgumentException() { FluentActions.Invoking(() => MassUnit.FromSymbol("abcabc")) .Should().ThrowExactly <ArgumentException>(); }
public void CrmGenericMigratorIntantiation() { FluentActions.Invoking(() => new CrmGenericMigratorFactory()) .Should() .NotThrow(); }
public void ShouldRequireMinimumFields() { var query = new GetProjectIssuesListQuery(); FluentActions.Invoking(() => SendAsync(query)).Should().Throw <NotFoundException>(); }
public void ShouldRequireMinimumFields() { var command = new CreateTourPackageCommand(); FluentActions.Invoking(() => SendAsync(command)).Should().Throw <ValidationException>(); }
public void ValidIfAreaExist_When_NotExist_Should_Throw_MissingValueException() { FluentActions.Invoking(() => new Room(null, "p1", 1)) .Should() .Throw <MissingValueException>(); }
public void ShouldThrowAdAccountInvalidExceptionForInvalidAdAccount() { FluentActions.Invoking(() => (AdAccount)"SSWJason") .Should().Throw <AdAccountInvalidException>(); }
public void ValidFlatNumber_For_NotPositiveNumber_Throw_NotPositiveFlatNumber(int flatNumber) { FluentActions.Invoking(() => new Address("Opole", "Prószkowska", "45-758", 1, flatNumber)) .Should() .Throw <NotPositiveFlatNumber>(); }