Skip to content

Commit

Permalink
split tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Nov 1, 2022
1 parent 66bd02c commit cbe8cdc
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 63 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
b
b

This file was deleted.

This file was deleted.

Empty file.
49 changes: 0 additions & 49 deletions src/Verify.Tests/Serialization/SerializationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -648,41 +648,6 @@ public Task EmptyDictionaryProperty() =>
property = new Dictionary<string, string>()
});

[Fact]
public Task ByteArray() =>
Verify(
new byte[]
{
1
},
"bin");

[Fact]
public Task ByteArrayNoExtension() =>
Verify(
new byte[]
{
1
});

[Fact]
public Task NestedByteArray() =>
Verify(
new
{
bytes = new byte[]
{
1
}
});

[Fact]
public async Task EmptyBinary()
{
var exception = await Assert.ThrowsAsync<Exception>(() => Verify(Array.Empty<byte>(), "bin"));
Assert.Equal("Empty data is not allowed.", exception.Message);
}

[Fact]
public Task ExampleNonDefaults()
{
Expand Down Expand Up @@ -964,10 +929,6 @@ class DateTimeTarget

#endif

[Fact]
public Task VerifyBytes() =>
Verify(File.ReadAllBytes("sample.jpg"), "jpg");

[Fact]
public Task ShouldNotScrubInlineGuidsByDefault()
{
Expand Down Expand Up @@ -2945,16 +2906,6 @@ public Task VerifyJsonStream()
return VerifyJson(stream);
}

[Fact]
public Task StreamMember()
{
var stream = new MemoryStream(Encoding.UTF8.GetBytes("value"));
return Verify(new
{
stream
});
}

[Fact]
public Task VerifyJsonJToken()
{
Expand Down
48 changes: 47 additions & 1 deletion src/Verify.Tests/StreamTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,55 @@ public Task Stream() =>
new MemoryStream(new byte[]
{
1
}),
}));
[Fact]
public Task ByteArray() =>
Verify(
new byte[]
{
1
});

[Fact]
public Task ByteArrayWithExtension() =>
Verify(
new byte[]
{
1
},
"bin");

[Fact]
public Task StreamMember()
{
var stream = new MemoryStream(Encoding.UTF8.GetBytes("value"));
return Verify(new
{
stream
});
}

[Fact]
public Task VerifyBytes() =>
Verify(File.ReadAllBytes("sample.jpg"), "jpg");

[Fact]
public async Task EmptyBinary()
{
var exception = await Assert.ThrowsAsync<Exception>(() => Verify(Array.Empty<byte>(), "bin"));
Assert.Equal("Empty data is not allowed.", exception.Message);
}
[Fact]
public Task NestedByteArray() =>
Verify(
new
{
bytes = new byte[]
{
1
}
});

#region StreamWithExtension

[Fact]
Expand Down

0 comments on commit cbe8cdc

Please sign in to comment.