Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@TimothyMakkison
Copy link
Contributor

Add test for IObservable<IApiResponse<T>>

@TimothyMakkison TimothyMakkison force-pushed the IObservable_IApiResponse branch 2 times, most recently from 9ff1e13 to d1328fa Compare April 8, 2025 22:59
@ChrisPulman
Copy link
Member

Hi @TimothyMakkison were you expecting this to be building and passing the tests at this point, or is there further work to be done?

@TimothyMakkison
Copy link
Contributor Author

TimothyMakkison commented Apr 18, 2025

I thought it was a simple test addition 😔

I have no idea who it keeps failing. The failure message doesn't seem related to my change no?

@TimothyMakkison
Copy link
Contributor Author

TimothyMakkison commented Apr 18, 2025

NVM I think IGitHubApi is used by the FindInterfacesSmokeTest?

Should I move this test to a different file or fix the generator test?

@ChrisPulman
Copy link
Member

Nvm githubapi is used by source generator test hence why it's breaking

Should I move this test to a different file or fix the generator test?

Perhaps fixing the generator test would be best. I am currently working in Australia so haven't had much availability. Back to the UK on Tuesday

@TimothyMakkison
Copy link
Contributor Author

Perhaps fixing the generator test would be best

👍

Is it okay if I add verify to Refit.Tests, updating this file was a massive pain for #1967

I can't remember why I didn't do this before

@ChrisPulman
Copy link
Member

Perhaps fixing the generator test would be best

👍

Is it okay if I add verify to Refit.Tests, updating this file was a massive pain for #1967

I can't remember why I didn't do this before

Yes that's fine, we use it widely across the ReactiveUI projects

@TimothyMakkison
Copy link
Contributor Author

TimothyMakkison commented Apr 23, 2025

Build keeps failing because the initialisation of verify is somehow running twice despite being inside a static constructor. I have no idea how this happens, I thought type initialisation code only ran once.

Normally this would be fixed by using ModuleInitializer to run the code once, unfortunately net framework doesn't support this.
Instead I've added a static bool to check if initialisation code has been run yet.

Added a try catch statement for the initialisation logic.

I read the verify docs and it turns out I can use ModuleInitializer See here

@TimothyMakkison TimothyMakkison force-pushed the IObservable_IApiResponse branch from 428b27f to 63b6d83 Compare April 23, 2025 14:40
@TimothyMakkison TimothyMakkison force-pushed the IObservable_IApiResponse branch from 63b6d83 to 075dbb5 Compare April 23, 2025 15:20
@codecov
Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.37%. Comparing base (6ebeda5) to head (9624007).
Report is 185 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1964      +/-   ##
==========================================
- Coverage   87.73%   85.37%   -2.36%     
==========================================
  Files          33       37       +4     
  Lines        2348     2510     +162     
  Branches      294      365      +71     
==========================================
+ Hits         2060     2143      +83     
- Misses        208      289      +81     
+ Partials       80       78       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ChrisPulman ChrisPulman merged commit 9342107 into reactiveui:main Apr 23, 2025
2 of 3 checks passed
@github-actions
Copy link

github-actions bot commented May 8, 2025

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants