public JsonResult GreaterSoftware([FromUri] SearchRequest request) { if (!ModelState.IsValid) { return(new JsonResult(new List <Software> { new Software { Name = "Invalid", Version = "Input was not in correct format." } } )); } var inputVersion = software.GetInputVersion(request.Input); return(new JsonResult(software.GetSoftwareGreaterThan(inputVersion, SoftwareManager.GetAllSoftware()))); }
public void WhenOnlyMajorProvided_ReturnsWithMinorAndPatch() { var version = softwareUtility.GetInputVersion("2"); Assert.AreEqual(new Version(2, 0, 0), version); }