Fix CompareTo in RequestMatchResult (#345)

* Fix CompareTo in RequestMatchResult
#344

* fix test
This commit is contained in:
Stef Heyenrath
2019-09-17 14:50:43 +02:00
committed by GitHub
parent 2f406029c9
commit 5b8b588983
6 changed files with 117 additions and 24 deletions

View File

@@ -49,8 +49,9 @@ namespace WireMock.Owin
}
return mappings
.OrderBy(m => m.Mapping.Priority)
.FirstOrDefault(m => m.RequestMatchResult.IsPerfectMatch);
.Where(m => m.RequestMatchResult.IsPerfectMatch)
.OrderBy(m => m.Mapping.Priority).ThenBy(m => m.RequestMatchResult)
.FirstOrDefault();
}
}
}