Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tmathura committed Sep 1, 2020
1 parent e502796 commit c704cc5
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ public async Task Execute()

// Act
var commandData = await _getComputerDrivesCommand.Execute();
var computerDrives = JsonConvert.DeserializeObject<List<ComputerDriveModel>>(commandData);

var computerDrives = new List<ComputerDriveModel>();
foreach (var json in commandData)
{
computerDrives.Add(JsonConvert.DeserializeObject<ComputerDriveModel>(json));
}

// Assert
Assert.AreEqual(noOfComputerDrives, computerDrives.Count);
Expand All @@ -48,7 +53,12 @@ public async Task Execute_ZeroComputerDrives()

// Act
var commandData = await _getComputerDrivesCommand.Execute();
var computerDrives = JsonConvert.DeserializeObject<List<ComputerDriveModel>>(commandData);

var computerDrives = new List<ComputerDriveModel>();
foreach (var json in commandData)
{
computerDrives.Add(JsonConvert.DeserializeObject<ComputerDriveModel>(json));
}

// Assert
Assert.AreEqual(0, computerDrives.Count);
Expand Down

0 comments on commit c704cc5

Please sign in to comment.