Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Undesirable side effect of all property getters being called during initialization #4049

Copy link
Copy link

Description

@Dalet
Issue body actions

A recent change broke my tests after upgrading because TUnit now calls all property getters during initialization

var value = property.GetValue(obj);

Now my custom WebApplicationFactory class app host is built right after being injected (when the Server property is accessed), before I even have a chance to configure it.

I could refactor around this but this seems like an undesirable behavior in the first place. Why not initialize only the properties that have the ClassDataSource attribute?

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.