1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-27 03:41:30 +01:00
bitwarden-server/test/Core.Test/Models/Data/SendFileDataTests.cs
Justin Baur bae03feffe
Revert filescoped (#2227)
* Revert "Add git blame entry (#2226)"

This reverts commit 239286737d.

* Revert "Turn on file scoped namespaces (#2225)"

This reverts commit 34fb4cca2a.
2022-08-29 15:53:48 -04:00

29 lines
763 B
C#

using System.Text.Json;
using Bit.Core.Models.Data;
using Bit.Test.Common.Helpers;
using Xunit;
namespace Bit.Core.Test.Models.Data
{
public class SendFileDataTests
{
[Fact]
public void Serialize_Success()
{
var sut = new SendFileData
{
Id = "test",
Size = 100,
FileName = "thing.pdf",
Validated = true,
};
var json = JsonSerializer.Serialize(sut);
var document = JsonDocument.Parse(json);
var root = document.RootElement;
AssertHelper.AssertJsonProperty(root, "Size", JsonValueKind.String);
Assert.False(root.TryGetProperty("SizeString", out _));
}
}
}