jefffhaynes / BinarySerializer

A declarative serialization framework for controlling formatting of data at the byte and bit level using field bindings, converters, and code.
MIT License
289 stars 62 forks source link

Errors running unit tests #150

Closed shaggygi closed 4 years ago

shaggygi commented 4 years ago

I recently forked the code and tried running the unit tests and are failing. Have you seen this or is there something I forget to setup/config correctly?

I also get exceptions while serializing/deserializing some files based on PcapNgNet and wasn't sure if this is related. I can try and provide more details, but wanted to see if this was a known issue since it was labeled "Beta" first.

Any help is appreciated.

jefffhaynes commented 4 years ago

They're passing for me...can you give me an example of what's not passing?

jefffhaynes commented 4 years ago

Closing this but please reopen if you need more help with this.

shaggygi commented 4 years ago

@jefffhaynes sorry for delayed response. I tried forking, rebuilding and testing again and appear less tests are now failing. I noticed 140 and 149 are the ones that fail each time. Below is a copy of what is shown in Test Explorer...

BinarySerialization.Test.Issues.Issue140.Issue140Tests.Test Source: Issue140Tests.cs line 11 Duration: 15 ms

Message: System.AggregateException : One or more errors occurred. (Error deserializing 'type 'BinarySerialization.Test.Issues.Issue140.Question''. See inner exception for detail.) ---- System.InvalidOperationException : Error deserializing 'type 'BinarySerialization.Test.Issues.Issue140.Question''. See inner exception for detail. -------- System.InvalidOperationException : Error deserializing 'type 'BinarySerialization.Test.Issues.Issue140.Question''. See inner exception for detail. ------------ System.InvalidOperationException : Error deserializing 'member 'Domain''. See inner exception for detail. ---------------- System.InvalidOperationException : 'Labels' does not have a FieldOrder attribute. All serializable fields or properties in a class with more than one member must specify a FieldOrder attribute. Stack Trace: Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) Task.Wait() TestBase.Deserialize[T](Stream stream, Object context) line 158 TestBase.Roundtrip[T](T o, Object context) line 39 Issue140Tests.Test() line 18 ----- Inner Stack Trace ----- ValueNode.ThrowDeserializationException(Exception e) line 413 ValueNode.DeserializeAsync(BoundedStream stream, EventShuttle eventShuttle, CancellationToken cancellationToken) line 397 BinarySerializer.DeserializeAsync(Stream stream, Type type, Object context, CancellationToken cancellationToken) line 239 BinarySerializer.DeserializeAsync[T](Stream stream, Object context) line 289 ----- Inner Stack Trace ----- ValueNode.ThrowDeserializationException(Exception e) line 413 ValueNode.DeserializeAsync(BoundedStream stream, EventShuttle eventShuttle, CancellationToken cancellationToken) line 397 ValueNode.DeserializeInternalAsync(BoundedStream stream, Func1 maxLengthDelegate, EventShuttle eventShuttle, CancellationToken cancellationToken) line 850 ValueNode.DeserializeAsync(BoundedStream stream, EventShuttle eventShuttle, CancellationToken cancellationToken) line 385 ----- Inner Stack Trace ----- ValueNode.ThrowDeserializationException(Exception e) line 413 ValueNode.DeserializeAsync(BoundedStream stream, EventShuttle eventShuttle, CancellationToken cancellationToken) line 397 ObjectValueNode.ObjectDeserializeOverrideAsync(BoundedStream stream, EventShuttle eventShuttle, CancellationToken cancellationToken) line 256 ObjectValueNode.DeserializeOverrideAsync(BoundedStream stream, EventShuttle eventShuttle, CancellationToken cancellationToken) line 133 ValueNode.DeserializeInternalAsync(BoundedStream stream, Func1 maxLengthDelegate, EventShuttle eventShuttle, CancellationToken cancellationToken) line 850 ValueNode.DeserializeAsync(BoundedStream stream, EventShuttle eventShuttle, CancellationToken cancellationToken) line 385 ----- Inner Stack Trace ----- ObjectValueNode.ThrowIfUnordered() line 539 ObjectValueNode.DeserializeOverrideAsync(BoundedStream stream, EventShuttle eventShuttle, CancellationToken cancellationToken) line 123 ValueNode.DeserializeInternalAsync(BoundedStream stream, Func`1 maxLengthDelegate, EventShuttle eventShuttle, CancellationToken cancellationToken) line 850 ValueNode.DeserializeAsync(BoundedStream stream, EventShuttle eventShuttle, CancellationToken cancellationToken) line 385