Skip to content

Commit

Permalink
add all field value comparisons to existing agent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sooamazing committed Oct 27, 2024
1 parent ac5e266 commit 357ddc7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Mimir.E2ETests/AgentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ public async Task CompareAgentDataFromDifferentServices_ShouldMatch(string addre
var agentDataFromHeadless = await GetHeadlessAgentData(new Address(address));

Assert.Equal(agentDataFromMimir.Address, agentDataFromHeadless.Address.ToString());
Assert.Equal(agentDataFromMimir.MonsterCollectionRound, agentDataFromHeadless.MonsterCollectionRound);

var mimirAvatarAddresses = agentDataFromMimir.AvatarAddresses;
var headlessAvatarAddresses = agentDataFromHeadless.AvatarAddresses;
foreach (var mimirAddress in mimirAvatarAddresses)
{
if (headlessAvatarAddresses.TryGetValue(mimirAddress.Key, out var headlessValue))
{
Assert.Equal(mimirAddress.Value, headlessValue.ToString());
}
else
{
Assert.Fail();
}
}
}

public async Task<IGetAgent_Agent> GetMimirAgentData(Address address)
Expand All @@ -45,4 +60,4 @@ public async Task<AgentState> GetHeadlessAgentData(Address address)
var result = CodecUtil.DecodeState(stateResponse.Data.State);
return new AgentState(result);
}
}
}

0 comments on commit 357ddc7

Please sign in to comment.