public void LookupFalseTest() { GroundTruth.CreateGroundTruthLookup(); string[] imageArray = GroundTruth.GetImageKeys(); bool isHealthy = GroundTruth.Lookup("DSC00041.JPG"); Assert.IsFalse(isHealthy); }
// Attempt AI Prediction: public JsonResult OnGetGroundTruth() { // Get the query string: var queryStringObject = Request.QueryString; string queryString = queryStringObject.ToString(); // Parse the query string and extract parameters: string[] queryParams = queryString.Split("&"); string imageURL = queryParams[1].Replace("imageURL=", ""); // Attempt to return the response: return(new JsonResult(GroundTruth.Lookup(imageURL))); }
public void getNumTrueAndFalse() { int numTrue = 0; int numFalse = 0; GroundTruth.CreateGroundTruthLookup(); string[] imageArray = GroundTruth.GetImageKeys(); int numImages = imageArray.Length; for (int i = 0; i < imageArray.Length; i++) { if (GroundTruth.Lookup((imageArray[i]).ToString()) == true) { numTrue++; } else { numFalse++; } } Assert.IsTrue((numFalse + numTrue) == numImages); }