Skip to content

[Repo Assist] test(agents): convert Agents.Lib tests to Expecto.Flip style#200

Draft
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/fix-issue-197-expecto-flip-agent-tests-b4bbbfd354ccfa5e
Draft

[Repo Assist] test(agents): convert Agents.Lib tests to Expecto.Flip style#200
github-actions[bot] wants to merge 1 commit intomasterfrom
repo-assist/fix-issue-197-expecto-flip-agent-tests-b4bbbfd354ccfa5e

Conversation

@github-actions
Copy link
Contributor

🤖 This is an automated pull request from Repo Assist.

Closes #197

What Changed

All Expect.* assertions in tests/Informedica.Agents.Tests/Tests.fs have been converted to use Expecto.Flip reversed-argument style, as requested in #197.

Changes

  • Added open Expecto.Flip after open Expecto
  • Converted all 55 Expect.* calls to the pipe-first pattern:
Before (standard Expecto) After (Expecto.Flip)
Expect.equal actual expected "msg" actual |> Expect.equal "msg" expected
Expect.isTrue cond "msg" cond |> Expect.isTrue "msg"
Expect.isFalse cond "msg" cond |> Expect.isFalse "msg"
Expect.isNone x "msg" x |> Expect.isNone "msg"
Expect.isSome x "msg" x |> Expect.isSome "msg"
Expect.stringContains s sub "msg" s |> Expect.stringContains "msg" sub
Expect.throwsT(T) fn "msg" fn |> Expect.throwsT(T) "msg"
Expect.isGreaterThan actual lb "msg" Expect.isGreaterThan "msg" (actual, lb)

Note: Expect.isGreaterThan in Expecto.Flip uses a tuple (actual, lowerBound) rather than separate piped args — this matches the existing pattern in Informedica.ZIndex.Tests.

Test Status

  • Build: dotnet build tests/Informedica.Agents.Tests/ — succeeded, 0 warnings, 0 errors
  • Tests: 46/48 pass — same as baseline before this change
  • ℹ️ 2 pre-existing failures in property-based tests (stateful agent maintains state consistency, agent should process all posted messages) — these failures existed on master before this PR and are unrelated to the assertion-style refactoring

AI Disclosure

This pull request was created by Repo Assist, an automated AI assistant. The change is a mechanical style refactoring with no logic changes; all assertions preserve the same semantics.

Generated by Repo Assist

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@f2c5cf1e4af58e09a93ba0703c6bf084711b265f

Addresses #197 — update all Expect.* assertions in
tests/Informedica.Agents.Tests/Tests.fs to use Expecto.Flip
reversed-argument style:

- Add `open Expecto.Flip` after `open Expecto`
- All 55 Expect.* calls converted to pipe-first style:
  - Unary (isTrue/isFalse/isNone/isSome):
    actual |> Expect.fn "msg"
  - Binary (equal/stringContains):
    actual |> Expect.fn "msg" expected
  - throwsT<T>: fn moved to pipe position
  - isGreaterThan: uses Flip tuple form
    Expect.isGreaterThan "msg" (actual, lowerBound)

No test logic was changed; all 46 previously-passing tests
still pass after the refactoring.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent tests

0 participants