Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Oct 31, 2023
1 parent 5b61162 commit 46cd26a
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,5 +339,27 @@ public void Parse_WithNullFirstReleaseModel_ReturnsNoReleasesFound()
Assert.AreEqual(UpdateStatus.NoReleasesFound, result.Key);
Assert.AreEqual(string.Empty, result.Value);
}


[TestMethod]
public void Parse_WithNullFirstReleaseModel_Returns_EmptyReleaseModel()
{
// Arrange
IEnumerable<ReleaseModel> releaseModelList = new List<ReleaseModel>
{
new ReleaseModel
{
TagName = null
}
};
const string currentVersion = "1.0.0"; // Provide a valid version

// Act
var result = CheckForUpdates.Parse(releaseModelList, currentVersion);

// Assert
Assert.AreEqual(UpdateStatus.NoReleasesFound, result.Key);
Assert.AreEqual(string.Empty, result.Value);
}
}
}

0 comments on commit 46cd26a

Please sign in to comment.