public void Convert() { var random = new Random(); var data = new ErrorData(Guid.NewGuid()) { ClassName = StringHelper.ValidString(), DeploymentId = StringHelper.ValidString(), ErrorCode = random.Next(), EventTypeValue = 2, MachineName = StringHelper.ValidString(), Message = StringHelper.ValidString(), OccurredOn = DateTime.UtcNow, ParentId = Guid.NewGuid(), Source = StringHelper.ValidString(), StackTrace = StringHelper.ValidString(), SessionIdentifier = Guid.NewGuid(), }; var converted = data.Convert(); Assert.AreEqual <string>(data.ClassName, converted.ClassName); Assert.AreEqual <string>(data.DeploymentId, converted.DeploymentId); Assert.AreEqual <int>(data.ErrorCode, converted.ErrorCode); Assert.AreEqual <int>(data.EventTypeValue, (int)converted.EventType); Assert.AreEqual <string>(data.MachineName, converted.MachineName); Assert.AreEqual <string>(data.Message, converted.Message); Assert.AreEqual <DateTime>(data.OccurredOn, converted.OccurredOn); Assert.AreEqual <string>(data.Source, converted.Source); Assert.AreEqual <string>(data.StackTrace, converted.StackTrace); Assert.AreEqual <Guid>(data.ApplicationId, converted.Token.ApplicationId); Assert.AreEqual <Guid>(data.ParentId, converted.ParentIdentifier); Assert.AreEqual <Guid>(Guid.Parse(data.RowKey), converted.Identifier); Assert.AreEqual <Guid?>(data.SessionIdentifier, converted.SessionIdentifier); }