# Summary

Class: | WireMock.Serialization.LogEntryMapper
Assembly: | WireMock.Net
File(s): | C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Serialization\LogEntryMapper.cs
Covered lines: | 60
Uncovered lines: | 0
Coverable lines: | 60
Total lines: | 72
Line coverage: | 100%
Branch coverage: | 100%

# Metrics

Method | Cyclomatic complexity | NPath complexity | Sequence coverage | Branch coverage
--- | --- | --- | --- | ---
Map(...) | 0 | 0 | 1 | 1

# File(s)

## C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Serialization\LogEntryMapper.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System.Linq;`
|  | `2` |  | `using WireMock.Admin.Mappings;`
|  | `3` |  | `using WireMock.Admin.Requests;`
|  | `4` |  | `using WireMock.Logging;`
|  | `5` |  | ``
|  | `6` |  | `namespace WireMock.Serialization`
|  | `7` |  | `{`
|  | `8` |  | `internal static class LogEntryMapper`
|  | `9` |  | `{`
|  | `10` |  | `public static LogEntryModel Map(LogEntry logEntry)`
| 69 | `11` |  | `{`
| 69 | `12` |  | `return new LogEntryModel`
| 69 | `13` |  | `{`
| 69 | `14` |  | `Guid = logEntry.Guid,`
| 69 | `15` |  | `Request = new LogRequestModel`
| 69 | `16` |  | `{`
| 69 | `17` |  | `DateTime = logEntry.RequestMessage.DateTime,`
| 69 | `18` |  | `ClientIP = logEntry.RequestMessage.ClientIP,`
| 69 | `19` |  | `Path = logEntry.RequestMessage.Path,`
| 69 | `20` |  | `AbsolutePath = logEntry.RequestMessage.AbsolutePath,`
| 69 | `21` |  | `Url = logEntry.RequestMessage.Url,`
| 69 | `22` |  | `AbsoluteUrl = logEntry.RequestMessage.AbsoluteUrl,`
| 69 | `23` |  | `Query = logEntry.RequestMessage.Query,`
| 69 | `24` |  | `Method = logEntry.RequestMessage.Method,`
| 69 | `25` |  | `Body = logEntry.RequestMessage.Body,`
| 69 | `26` |  | `BodyAsJson = logEntry.RequestMessage.BodyAsJson,`
| 69 | `27` |  | `BodyAsBytes = logEntry.RequestMessage.BodyAsBytes,`
| 69 | `28` |  | `Headers = logEntry.RequestMessage.Headers,`
| 69 | `29` |  | `Cookies = logEntry.RequestMessage.Cookies,`
| 69 | `30` |  | `BodyEncoding = logEntry.RequestMessage.BodyEncoding != null ? new EncodingModel`
| 69 | `31` |  | `{`
| 69 | `32` |  | `EncodingName = logEntry.RequestMessage.BodyEncoding.EncodingName,`
| 69 | `33` |  | `CodePage = logEntry.RequestMessage.BodyEncoding.CodePage,`
| 69 | `34` |  | `WebName = logEntry.RequestMessage.BodyEncoding.WebName`
| 69 | `35` |  | `} : null`
| 69 | `36` |  | `},`
| 69 | `37` |  | `Response = new LogResponseModel`
| 69 | `38` |  | `{`
| 69 | `39` |  | `StatusCode = logEntry.ResponseMessage.StatusCode,`
| 69 | `40` |  | `BodyDestination = logEntry.ResponseMessage.BodyDestination,`
| 69 | `41` |  | `Body = logEntry.ResponseMessage.Body,`
| 69 | `42` |  | `BodyAsJson = logEntry.ResponseMessage.BodyAsJson,`
| 69 | `43` |  | `BodyAsBytes = logEntry.ResponseMessage.BodyAsBytes,`
| 69 | `44` |  | `BodyOriginal = logEntry.ResponseMessage.BodyOriginal,`
| 69 | `45` |  | `BodyAsFile = logEntry.ResponseMessage.BodyAsFile,`
| 69 | `46` |  | `BodyAsFileIsCached = logEntry.ResponseMessage.BodyAsFileIsCached,`
| 69 | `47` |  | `Headers = logEntry.ResponseMessage.Headers,`
| 69 | `48` |  | `BodyEncoding = logEntry.ResponseMessage.BodyEncoding != null ? new EncodingModel`
| 69 | `49` |  | `{`
| 69 | `50` |  | `EncodingName = logEntry.ResponseMessage.BodyEncoding.EncodingName,`
| 69 | `51` |  | `CodePage = logEntry.ResponseMessage.BodyEncoding.CodePage,`
| 69 | `52` |  | `WebName = logEntry.ResponseMessage.BodyEncoding.WebName`
| 69 | `53` |  | `} : null`
| 69 | `54` |  | `},`
| 69 | `55` |  | `MappingGuid = logEntry.MappingGuid,`
| 69 | `56` |  | `MappingTitle = logEntry.MappingTitle,`
| 69 | `57` |  | `RequestMatchResult = logEntry.RequestMatchResult != null ? new LogRequestMatchModel`
| 69 | `58` |  | `{`
| 69 | `59` |  | `TotalScore = logEntry.RequestMatchResult.TotalScore,`
| 69 | `60` |  | `TotalNumber = logEntry.RequestMatchResult.TotalNumber,`
| 69 | `61` |  | `IsPerfectMatch = logEntry.RequestMatchResult.IsPerfectMatch,`
| 69 | `62` |  | `AverageTotalScore = logEntry.RequestMatchResult.AverageTotalScore,`
| 177 | `63` |  | `MatchDetails = logEntry.RequestMatchResult.MatchDetails.Select(x => new`
| 177 | `64` |  | `{`
| 177 | `65` |  | `Name = x.Key.Name.Replace("RequestMessage", string.Empty),`
| 177 | `66` |  | `Score = x.Value`
| 177 | `67` |  | `} as object).ToList()`
| 69 | `68` |  | `} : null`
| 69 | `69` |  | `};`
| 69 | `70` |  | `}`
|  | `71` |  | `}`
|  | `72` |  | `}`

# Methods/Properties

Map(WireMock.Logging.LogEntry)