string escapeString(NonNull <string> str) => escapeString(str.Item);
public static string IdentifierForTypeOrNull <T>(this NonNull <string> id) => id.IsIdentifierForType <T>() ? id.IdentifierForType <T>() : null;
public void Given_argument_is_OrExpression_Constructor_should_wrap_it_inside_a_GroupExpression(NonNull <OrExpression> expression) => Given_argument_needs_wrapping_Constructor_should_wrap_it_inside_a_GroupExpression(expression.Item);
public FooOutput Mutate(NonNull <FooInput> input) => new FooOutput { Result = 2 * input.Value.A };
public Property Given_NotExpression_GetComplexity_should_return_same_complexity_as_embedded_expression(NonNull <NotExpression> notExpression) => (notExpression.Item.Complexity == notExpression.Item.Expression.Complexity).ToProperty();
public Property Given_NotExpression_and_a_filter_expression_that_is_not_null_Equals_should_be_symetric(NonNull <NotExpression> notExpression, NonNull <FilterExpression> filterExpression) => (notExpression.Item.Equals(filterExpression.Item) == filterExpression.Item.Equals(notExpression.Item)).ToProperty();
public async Task <MutationInfo> UpdateContactInfo([Inject] IMediator mediator, [Inject] IRequestInfo requestInfo, NonNull <UpdateSupplierContactInfoParameters> parameters) { var command = new UpdateSupplierContactInfoCommand { Id = parameters.Value.Id, ContactInfo = parameters.Value.ContactInfo, Headers = new CommandHeaders(correlationId: Guid.NewGuid(), identity: requestInfo.Identity, remoteIpAddress: requestInfo.IpAddress) }; var result = await mediator.Send(command); return(MutationInfo.FromCommand(command)); }
public Property Equals_should_be_reflexive(NonNull <NotExpression> expression) => expression.Item.Equals(expression.Item).ToProperty();
public string ComplexInputObjectField(NonNull <ComplexInputObject> arg) => $"{arg.Value.Identifier}-{arg.Value.NullableObjects.First().Field1}-" + $"{arg.Value.NonNullableObjects.Last().Value.Field3}-{arg.Value.ListOfEnums.Value.First()}";
public async Task <MutationInfo> Add([Inject] IMediator mediator, [Inject] IRequestInfo requestInfo, NonNull <AddFinancialYearParameters> parameters) { var command = new AddFinancialYearCommand { Id = Guid.NewGuid(), Name = parameters.Value.Name, PreviousFinancialYearId = parameters.Value.PreviousFinancialYearId, Headers = new CommandHeaders(correlationId: Guid.NewGuid(), identity: requestInfo.Identity, remoteIpAddress: requestInfo.IpAddress) }; var result = await mediator.Send(command); return(MutationInfo.FromCommand(command)); }
public string NonNullableInputObjectField(NonNull <InputObject> arg) => arg.Value.ToString();
public NonNull <string> NonNullablePrimitiveField(NonNull <string> nonNullablePrimitiveArg) => nonNullablePrimitiveArg;
public async Task <NonNull <DoSomethingOutput> > TaskDoSomething(NonNull <DoSomethingInput> input) { await Task.Delay(1); return(DoSomething(input)); }
public DeleteOperation(NonNull<string> username) { UserName = username; }
public async Task <MutationInfo> AddTransfer([Inject] IMediator mediator, [Inject] IRequestInfo requestInfo, NonNull <AddTransferTransactionParameters> parameters) { var command = new AddTransferTransactionCommand { IdOrigin = Guid.NewGuid(), IdDestination = Guid.NewGuid(), FinancialYearId = parameters.Value.FinancialYearId, OriginAccountId = parameters.Value.OriginAccountId, DestinationAccountId = parameters.Value.DestinationAccountId, AmountInCents = parameters.Value.AmountInCents, Description = parameters.Value.Description, Comment = parameters.Value.Comment, CodeNames = parameters.Value.CodeNames, Headers = new CommandHeaders(correlationId: Guid.NewGuid(), identity: requestInfo.Identity, remoteIpAddress: requestInfo.IpAddress) }; var result = await mediator.Send(command); return(MutationInfo.FromCommand(command)); }
public NonNull <DoSomethingOutput> NonNullableDoSomething(NonNull <DoSomethingInput> input) => DoSomething(input);
public async Task <MutationInfo> UnassignCode([Inject] IMediator mediator, [Inject] IRequestInfo requestInfo, NonNull <UnassignCodeFromTransactionParameters> parameters) { var command = new UnassignCodeFromTransactionCommand { Id = parameters.Value.Id, CodeName = parameters.Value.CodeName, Headers = new CommandHeaders(correlationId: Guid.NewGuid(), identity: requestInfo.Identity, remoteIpAddress: requestInfo.IpAddress) }; var result = await mediator.Send(command); return(MutationInfo.FromCommand(command)); }
public Property Equals_should_be_symetric(NonNull <NotExpression> expression, NonNull <FilterExpression> otherExpression) => (expression.Item.Equals(otherExpression.Item) == otherExpression.Item.Equals(expression.Item)).ToProperty();
public async Task <MutationInfo> Remove([Inject] IMediator mediator, [Inject] IRequestInfo requestInfo, NonNull <RemoveAccountParameters> parameters) { var command = new RemoveAccountCommand { Id = parameters.Value.Id, Headers = new CommandHeaders(correlationId: Guid.NewGuid(), identity: requestInfo.Identity, remoteIpAddress: requestInfo.IpAddress) }; var result = await mediator.Send(command); return(MutationInfo.FromCommand(command)); }
public Property Given_NotExpression_Equals_should_be_reflexive(NonNull <NotExpression> notExpression) => notExpression.Item.Equals(notExpression.Item).ToProperty();
public void Given_TextExpression_as_input_EscapedParseableString_should_be_correct(NonNull <TextExpression> text) { // Arrange StartsWithExpression expression = new(text.Item); string expected = $"{text.Item.EscapedParseableString}*"; // Act string actual = expression.EscapedParseableString; // Assert actual.Should() .Be(expected); }
public Property Given_two_instances_holding_same_Expressions_Equals_should_return_true(NonNull <FilterExpression> expression) { // Arrange NotExpression first = new(expression.Item); NotExpression other = new(expression.Item); // Act return(first.Equals(other) .And(first.GetHashCode() == other.GetHashCode())); }
public void GivenANonNull_ShouldReturnTrue(NonNull <object> nonNullObject) { var @object = nonNullObject.Item; @object.IsNotNull().Should().BeTrue(); }
public BarOutput Mutate(NonNull <BarInput> input) => new BarOutput { Result = 100 + input.Value.B };
public bool Const_Function_Holds(NonNull <string> x, int y) => x.Get.Const <int, string>()(y) == Id <string>()(x.Get);
public List <SearchResult> Search(NonNull <string> searchFor) => new List <SearchResult> { new SearchResult(0.97, new Movie()), };
public bool Curry_Same_As_Apply(byte x, int y, NonNull <string> z, Func <byte, int, string, int> f) => f.Curry()(x)(y)(z.Get) == f.Apply(x).Apply(y).Apply(z.Get);
public OmdbResolver(WebClient webClient, NonNull <string> omdbApiKey) { WebClient = webClient; apiKey = omdbApiKey; }
public Property Null_Check_If_Null_Then(string x, NonNull <string> y) { string sut = x.IfNullThen(y.Get); return((x == null && sut == y.Get).ToProperty().Or(x != null && sut == x)); }
public static bool IsIdentifierForType <T>(this NonNull <string> id) => id.Value.IsIdentifierForType <T>();
public Property Equals_should_be_commutative(NonNull <NotExpression> first, FilterExpression second) => (first.Item.Equals(second) == second.Equals(first.Item)).ToProperty();
public GetOperation(NonNull<string> userName) { UserName = userName; }
public static void ReadGames(NonNull<string> filepath) { }