Skip to content

test: add scenario Structure1 test for MinimalApi #213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Accounts.MyContracts;

/// <summary>
/// Domain Interface for RequestHandler.
/// Description: Set name of account.
/// Operation: SetAccountName.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public interface ISetAccountNameHandler
{
/// <summary>
/// Execute method.
/// </summary>
/// <param name="parameters">The parameters.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task<SetAccountNameResult> ExecuteAsync(
SetAccountNameParameters parameters,
CancellationToken cancellationToken = default);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Accounts.MyContracts;

/// <summary>
/// Domain Interface for RequestHandler.
/// Description: Update name of account.
/// Operation: UpdateAccountName.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public interface IUpdateAccountNameHandler
{
/// <summary>
/// Execute method.
/// </summary>
/// <param name="parameters">The parameters.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task<UpdateAccountNameResult> ExecuteAsync(
UpdateAccountNameParameters parameters,
CancellationToken cancellationToken = default);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Accounts.MyContracts;

/// <summary>
/// UpdateAccountRequest.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public record UpdateAccountRequest(
string Name);
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Accounts.MyContracts;

/// <summary>
/// Parameters for operation request.
/// Description: Set name of account.
/// Operation: SetAccountName.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public record SetAccountNameParameters(
[property: FromRoute, Required] Guid AccountId,
[property: FromBody, Required] UpdateAccountRequest Request);
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Accounts.MyContracts;

/// <summary>
/// Parameters for operation request.
/// Description: Update name of account.
/// Operation: UpdateAccountName.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public record UpdateAccountNameParameters(
[property: FromRoute, Required] Guid AccountId,
[property: FromHeader] string? Name);
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Accounts.MyContracts;

/// <summary>
/// Results for operation request.
/// Description: Set name of account.
/// Operation: SetAccountName.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class SetAccountNameResult
{
private SetAccountNameResult(IResult result)
{
Result = result;
}

public IResult Result { get; }

/// <summary>
/// 200 - Ok response.
/// </summary>
public static SetAccountNameResult Ok(string? message = null)
=> new(TypedResults.Ok(message));

/// <summary>
/// Performs an implicit conversion from SetAccountNameResult to IResult.
/// </summary>
public static IResult ToIResult(SetAccountNameResult result)
=> result.Result;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Accounts.MyContracts;

/// <summary>
/// Results for operation request.
/// Description: Update name of account.
/// Operation: UpdateAccountName.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class UpdateAccountNameResult
{
private UpdateAccountNameResult(IResult result)
{
Result = result;
}

public IResult Result { get; }

/// <summary>
/// 200 - Ok response.
/// </summary>
public static UpdateAccountNameResult Ok(string? message = null)
=> new(TypedResults.Ok(message));

/// <summary>
/// Performs an implicit conversion from UpdateAccountNameResult to IResult.
/// </summary>
public static IResult ToIResult(UpdateAccountNameResult result)
=> result.Result;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Addresses.MyContracts;

/// <summary>
/// Domain Interface for RequestHandler.
/// Description: Get addresses by postal code.
/// Operation: GetAddressesByPostalCodes.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public interface IGetAddressesByPostalCodesHandler
{
/// <summary>
/// Execute method.
/// </summary>
/// <param name="parameters">The parameters.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task<GetAddressesByPostalCodesResult> ExecuteAsync(
GetAddressesByPostalCodesParameters parameters,
CancellationToken cancellationToken = default);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Addresses.MyContracts;

/// <summary>
/// Parameters for operation request.
/// Description: Get addresses by postal code.
/// Operation: GetAddressesByPostalCodes.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public record GetAddressesByPostalCodesParameters(
[property: FromRoute, Required] string PostalCode);
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.Addresses.MyContracts;

/// <summary>
/// Results for operation request.
/// Description: Get addresses by postal code.
/// Operation: GetAddressesByPostalCodes.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class GetAddressesByPostalCodesResult
{
private GetAddressesByPostalCodesResult(IResult result)
{
Result = result;
}

public IResult Result { get; }

/// <summary>
/// 200 - Ok response.
/// </summary>
public static GetAddressesByPostalCodesResult Ok(List<Address> result)
=> new(TypedResults.Ok(result));

/// <summary>
/// 404 - NotFound response.
/// </summary>
public static GetAddressesByPostalCodesResult NotFound(string? message = null)
=> new(TypedResults.NotFound(message));

/// <summary>
/// Performs an implicit conversion from GetAddressesByPostalCodesResult to IResult.
/// </summary>
public static IResult ToIResult(GetAddressesByPostalCodesResult result)
=> result.Result;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.EventArgs.MyContracts;

/// <summary>
/// Domain Interface for RequestHandler.
/// Description: Get EventArgs By Id.
/// Operation: GetEventArgById.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public interface IGetEventArgByIdHandler
{
/// <summary>
/// Execute method.
/// </summary>
/// <param name="parameters">The parameters.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task<GetEventArgByIdResult> ExecuteAsync(
GetEventArgByIdParameters parameters,
CancellationToken cancellationToken = default);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.EventArgs.MyContracts;

/// <summary>
/// Domain Interface for RequestHandler.
/// Description: Get EventArgs List.
/// Operation: GetEventArgs.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public interface IGetEventArgsHandler
{
/// <summary>
/// Execute method.
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
Task<GetEventArgsResult> ExecuteAsync(
CancellationToken cancellationToken = default);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.EventArgs.MyContracts;

/// <summary>
/// EventArgs.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public record EventArgs(
Guid Id,
string EventName);
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.EventArgs.MyContracts;

/// <summary>
/// Parameters for operation request.
/// Description: Get EventArgs By Id.
/// Operation: GetEventArgById.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public record GetEventArgByIdParameters(
[property: FromRoute, Required] string Id);
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//------------------------------------------------------------------------------
// This code was auto-generated by ApiGenerator x.x.x.x.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------
namespace Structure1.Api.Generated.EventArgs.MyContracts;

/// <summary>
/// Results for operation request.
/// Description: Get EventArgs By Id.
/// Operation: GetEventArgById.
/// </summary>
[GeneratedCode("ApiGenerator", "x.x.x.x")]
public class GetEventArgByIdResult
{
private GetEventArgByIdResult(IResult result)
{
Result = result;
}

public IResult Result { get; }

/// <summary>
/// 200 - Ok response.
/// </summary>
public static GetEventArgByIdResult Ok(EventArgs result)
=> new(TypedResults.Ok(result));

/// <summary>
/// 404 - NotFound response.
/// </summary>
public static GetEventArgByIdResult NotFound(string? message = null)
=> new(TypedResults.NotFound(message));

/// <summary>
/// Performs an implicit conversion from GetEventArgByIdResult to IResult.
/// </summary>
public static IResult ToIResult(GetEventArgByIdResult result)
=> result.Result;
}
Loading
Loading