2022-01-21 15:36:25 +01:00
|
|
|
|
using System.Text.Json;
|
|
|
|
|
using Bit.Core.Entities;
|
2020-12-08 02:35:34 +01:00
|
|
|
|
using Bit.Core.Test.AutoFixture.CipherFixtures;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
2021-05-13 23:14:56 +02:00
|
|
|
|
namespace Bit.Core.Test.Models
|
2020-12-08 02:35:34 +01:00
|
|
|
|
{
|
|
|
|
|
public class CipherTests
|
|
|
|
|
{
|
|
|
|
|
[Theory]
|
|
|
|
|
[InlineUserCipherAutoData]
|
|
|
|
|
[InlineOrganizationCipherAutoData]
|
|
|
|
|
public void Clone_CreatesExactCopy(Cipher cipher)
|
|
|
|
|
{
|
2022-01-21 15:36:25 +01:00
|
|
|
|
Assert.Equal(JsonSerializer.Serialize(cipher), JsonSerializer.Serialize(cipher.Clone()));
|
2020-12-08 02:35:34 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|