mirror of
https://github.com/bitwarden/server.git
synced 2024-12-11 15:17:44 +01:00
231eb84e69
* Turn on ImplicitUsings * Fix formatting * Run linter
28 lines
998 B
C#
28 lines
998 B
C#
using Bit.Core.Models.Data.Organizations.OrganizationConnections;
|
|
using Bit.Core.Models.OrganizationConnectionConfigs;
|
|
using Bit.Core.OrganizationFeatures.OrganizationConnections;
|
|
using Bit.Core.Repositories;
|
|
using Bit.Test.Common.AutoFixture;
|
|
using Bit.Test.Common.AutoFixture.Attributes;
|
|
using Bit.Test.Common.Helpers;
|
|
using NSubstitute;
|
|
using Xunit;
|
|
|
|
namespace Bit.Core.Test.OrganizationFeatures.OrganizationConnections
|
|
{
|
|
[SutProviderCustomize]
|
|
public class CreateOrganizationConnectionCommandTests
|
|
{
|
|
[Theory]
|
|
[BitAutoData]
|
|
public async Task CreateAsync_CallsCreate(OrganizationConnectionData<BillingSyncConfig> data,
|
|
SutProvider<CreateOrganizationConnectionCommand> sutProvider)
|
|
{
|
|
await sutProvider.Sut.CreateAsync(data);
|
|
|
|
await sutProvider.GetDependency<IOrganizationConnectionRepository>().Received(1)
|
|
.CreateAsync(Arg.Is(AssertHelper.AssertPropertyEqual(data.ToEntity())));
|
|
}
|
|
}
|
|
}
|