mirror of
https://github.com/bitwarden/server.git
synced 2024-12-05 14:23:30 +01:00
3289a8c35e
* Move Api files * Move Core files * Move Infrastructure files * Move Sql Files * Move Api Sync files to Vault * Move test vault files * Update Sql.sqlproj paths * Update Codeowners * Fix vault file paths in sqlproj * Update CipherDetails.sql path in sqlproj * Update Core models and entities namespaces * Update namespaces Core Services and Repositories * Missed service namespaces * Update Api namespaces * Update Infrastructure namespaces * Move infrastructure queries that were missed * Tests namespace updates * Admin and Events namespace updates * Remove unused usings * Remove extra CiphersController usings * Rename folder * Fix CipherDetails namespace * Sqlproj fixes * Move stored procs into folders by table * using order fix
27 lines
709 B
C#
27 lines
709 B
C#
using System.Text.Json;
|
|
using Bit.Core.Test.AutoFixture.CipherFixtures;
|
|
using Bit.Core.Vault.Entities;
|
|
using Bit.Test.Common.AutoFixture.Attributes;
|
|
using Xunit;
|
|
|
|
namespace Bit.Core.Test.Models;
|
|
|
|
public class CipherTests
|
|
{
|
|
[Theory]
|
|
[UserCipherCustomize]
|
|
[BitAutoData]
|
|
public void Clone_UserCipher_CreatesExactCopy(Cipher cipher)
|
|
{
|
|
Assert.Equal(JsonSerializer.Serialize(cipher), JsonSerializer.Serialize(cipher.Clone()));
|
|
}
|
|
|
|
[Theory]
|
|
[OrganizationCipherCustomize]
|
|
[BitAutoData]
|
|
public void Clone_OrganizationCipher_CreatesExactCopy(Cipher cipher)
|
|
{
|
|
Assert.Equal(JsonSerializer.Serialize(cipher), JsonSerializer.Serialize(cipher.Clone()));
|
|
}
|
|
}
|