Skip to content

Feature/spells filtering#15

Merged
Katarzyna-Kadziolka merged 4 commits intodevelopfrom
feature/SpellsFiltering
Nov 30, 2021
Merged

Feature/spells filtering#15
Katarzyna-Kadziolka merged 4 commits intodevelopfrom
feature/SpellsFiltering

Conversation

@Katarzyna-Kadziolka
Copy link
Copy Markdown
Member

No description provided.

var expectedSpells = SpellsGenerator.Spells;
var expectedSpell = expectedSpells.First();
// Act
var response = await _client.GetAsync($"Spell?Name={expectedSpell.Name}");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use some QueryStringBuilder instead of building query string by yourself

var spells = await response.Content.DeserializeAsync<List<SpellDto>>();
// Assert
spells.Should().NotBeEmpty();
spells[0].Should().BeEquivalentTo(expectedSpell);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filter expectedSpells with .Where and compare two lists using Should().BeEquavalentOf(exectedSpells)

@Katarzyna-Kadziolka Katarzyna-Kadziolka merged commit d3d2e03 into develop Nov 30, 2021
@Katarzyna-Kadziolka Katarzyna-Kadziolka deleted the feature/SpellsFiltering branch November 30, 2021 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants