Skip to content

Commit

Permalink
Refactor variable names and add console output for initial pet ID
Browse files Browse the repository at this point in the history
  • Loading branch information
rpothin committed Apr 3, 2024
1 parent 4f8512d commit 7f7bb61
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ public void CreatePet_SetNameAndPoints()
public void PetPoints_DecreaseOverTime()
{
// Retrieve pet in initial state
Entity petInInitialState = _serviceClient.Retrieve("rpo_pet", _petId, new ColumnSet("rpo_lifepoints", "rpo_happinesspoints"));
Entity petInitialState = _serviceClient.Retrieve("rpo_pet", _petId, new ColumnSet("rpo_lifepoints", "rpo_happinesspoints"));

Console.WriteLine($"Initial pet id: {petInitialState.Id}");

// Wait for 3 minutes
Thread.Sleep(180000);
Expand All @@ -119,8 +121,8 @@ public void PetPoints_DecreaseOverTime()
var pet = _serviceClient.Retrieve("rpo_pet", _petId, new ColumnSet("rpo_lifepoints", "rpo_happinesspoints"));

// Validate the lifepoints and happinesspoints of the pet
var initialLifePoints = petInInitialState.GetAttributeValue<int>("rpo_lifepoints");
var initialHappinessPoints = petInInitialState.GetAttributeValue<int>("rpo_happinesspoints");
var initialLifePoints = petInitialState.GetAttributeValue<int>("rpo_lifepoints");
var initialHappinessPoints = petInitialState.GetAttributeValue<int>("rpo_happinesspoints");
var lifePoints = pet.GetAttributeValue<int>("rpo_lifepoints");
var happinessPoints = pet.GetAttributeValue<int>("rpo_happinesspoints");

Expand Down

0 comments on commit 7f7bb61

Please sign in to comment.