question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build out infrastructure to share behavior tests between RDF and RDG

See original GitHub issue

RDF (Request Delegate Factory) and RDG (Request Delegate Generator) have different logic for producing RequestDelegates from user handlers. However, the testing infrastructure for both approaches provides infrastructure for taking a RequestDelegate and HttpContext as input and asserting on the responses emitted. This infrastructure can be shared between the two projects so that we can construct a test library where RequestDelegates can be produced with different strategies (runtime or compile-time generation) but be run through the same tests to validate their behavior.

Issue Analytics

  • State:closed
  • Created 8 months ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
JamesNKcommented, Feb 21, 2023

Low-level tests of expression trees will remain unique. Just like there are probably low-level tests for the generator, and its output.

Any test that registers a minimal API lambda and then tests running it with an HttpContext can be shared. They’re kind of like in-memory functional tests. Part of this issue will be going through the existing RDF tests and moving+updating them to be sharable.

@captainsafia Injecting a fixture would be a good way to do it. I was thinking of something simpler, like a protected abstract method on the base class, but a fixture makes it easier to reuse this pattern on multiple test files.

0reactions
captainsafiacommented, Mar 20, 2023

We’re going to close this now since the shared infrastructure has been put in place. We still need to do work to migrate tests cases, that will be handled separately as we:

  • Add more features that are in parity with RDF
  • Move tests over for supported feature set
Read more comments on GitHub >

github_iconTop Results From Across the Web

RDF/RDG inconsistency when resolving query/route ...
The test case NullRouteParameterPrefersRouteOverQueryString highlights an error with the way that we resolve whether a parameter comes from ...
Read more >
ASP.NET Core updates in .NET 8 Preview 3
The RDG is a source generator that performs similar work to the RequestDelegateFactory (RDF), turning the various MapGet() , MapPost() , etc., ...
Read more >
A Teaching Tool for TEI to Linked Data Transformation
Linked data from TEI (LIFT) is a Python-based, open-source application for creating graphs of RDF statements from TEI documents. LIFT targets digital humanities ......
Read more >
Untitled
Sq503 flight status, Steering behavior affected bmw f10, ... #Chord gitar richard marx can't help falling in love, Build a blog from scratch,...
Read more >
SSWAP: A Simple Semantic Web Architecture and Protocol ...
Conclusion SSWAP addresses the three basic requirements of a semantic web services architecture (i.e., a common syntax, shared semantic, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found