Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions test/Id3.Net.Tests/SerializationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ limitations under the License.
*/
#endregion

using Id3.Frames;
using Id3.Serialization;
using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using Id3.Frames;
using Id3.Serialization;

using Xunit;

namespace Id3.Net.Tests
Expand All @@ -32,7 +31,8 @@ public sealed class SerializationTests
[Fact]
public void Serialize_deserialize_test()
{
var tag = new Id3Tag {
var tag = new Id3Tag
{
Title = "There Will Never Be Another Tonight",
Album = "Waking up the neighbors",
Track = new TrackFrame(9, 15),
Expand Down Expand Up @@ -66,7 +66,11 @@ public void Serialize_deserialize_test()
Assert.Equal(tag.Year.Value, clonedTag.Year.Value);
Assert.Equal(tag.Genre.Value, clonedTag.Genre.Value);
Assert.Equal(tag.Publisher.Value, clonedTag.Publisher.Value);
Assert.Equal(tag.RecordingDate.Value, clonedTag.RecordingDate.Value);

//https://github.com/JeevanJames/Id3/pull/27#issuecomment-565815805
//TDAT is only day and month
Assert.Equal(tag.RecordingDate.Value.Value.Month, clonedTag.RecordingDate.Value.Value.Month);
Assert.Equal(tag.RecordingDate.Value.Value.Day, clonedTag.RecordingDate.Value.Value.Day);

Assert.Equal(tag.Artists.Value.Count, clonedTag.Artists.Value.Count);
for (var i = 0; i < tag.Artists.Value.Count; i++)
Expand Down