Skip to content

Ability to serialize request bodies from IIdentifiable for integration testing #1263

Closed
@bjornharrtell

Description

@bjornharrtell

Some time ago generic client serialization was removed, which I used to implement roundtrip integration tests by serializing from mocked IIdentifiable objects.

It now looks like the only option to make such tests is to manually contruct request bodies fx. like at

var requestBody = new
{
data = new
{
type = "televisionBroadcasts",
attributes = new
{
title = newBroadcast.Title,
airedAt = newBroadcast.AiredAt,
archivedAt = newBroadcast.ArchivedAt
}
}
};
. In my opinion this is not optimal and can be difficult and error prone for more complex types.

I wish there was some (limited?) ability to serialize IIdentifiable for integration test purposes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions