Skip to content

Commit

Permalink
chore(agent): Setup create subcommand of unittest command (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
skarllot authored Jan 7, 2025
1 parent 0704def commit d27b7b7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
exclude:
- os: win
arch: arm64
- os: linux
arch: arm64
- os: osx
arch: x64

runs-on: ${{ matrix.image }}
defaults:
Expand Down Expand Up @@ -95,3 +99,4 @@ jobs:
run: |
dotnet publish --no-restore -r ${{ matrix.os }}-${{ matrix.arch }} -c Debug
7z a -tzip -mx9 flowpair-${{ matrix.os }}-${{ matrix.arch }}.zip $PWD/publish/*
if: (matrix.os == 'linux' && matrix.arch == 'x64') || (matrix.os == 'osx' && matrix.arch == 'arm64')
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,16 @@ This command will:

### Creating Unit Tests

To create a unit test for a specific code file, use the create-unittest command:
To create a unit test for a specific code file, use the `unittest create` command:

```bash
flowpair create-unittest -f <file-path> [-e <example-file-path>]
flowpair unittest create -f <file-path> [-e <example-file-path>]
```

Options:
- `-f` or `--file-path`: The file path of the code to test (Required)
- `-e` or `--example-file-path`: The example unit test file path (Optional)

This command will generate a unit test for the specified code file, optionally using an example unit test file as a reference.

## Contributing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public sealed class CreateUnitTestCommand(
/// </summary>
/// <param name="filePath">-f, The file path of the code to test.</param>
/// <param name="exampleFilePath">-e, The example unit test file path.</param>
[Command("create-unittest")]
[Command("unittest create")]
public int Execute(
string filePath,
string? exampleFilePath = null)
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.0",
"version": "1.1",
"pathFilters": ["src"],
"publicReleaseRefSpec": [
"^refs/tags/v\\d+\\.\\d+"
Expand Down

0 comments on commit d27b7b7

Please sign in to comment.