mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
Revert filescoped (#2227)
* Revert "Add git blame entry (#2226)" This reverts commit239286737d
. * Revert "Turn on file scoped namespaces (#2225)" This reverts commit34fb4cca2a
.
This commit is contained in:
@ -1,33 +1,34 @@
|
||||
using AutoFixture;
|
||||
using AutoFixture.Kernel;
|
||||
|
||||
namespace Bit.Test.Common.AutoFixture.Attributes;
|
||||
|
||||
public class SutProviderCustomization : ICustomization, ISpecimenBuilder
|
||||
namespace Bit.Test.Common.AutoFixture.Attributes
|
||||
{
|
||||
private IFixture _fixture = null;
|
||||
|
||||
public object Create(object request, ISpecimenContext context)
|
||||
public class SutProviderCustomization : ICustomization, ISpecimenBuilder
|
||||
{
|
||||
if (context == null)
|
||||
private IFixture _fixture = null;
|
||||
|
||||
public object Create(object request, ISpecimenContext context)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
if (!(request is Type typeRequest))
|
||||
{
|
||||
return new NoSpecimen();
|
||||
}
|
||||
if (!typeof(ISutProvider).IsAssignableFrom(typeRequest))
|
||||
{
|
||||
return new NoSpecimen();
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
if (!(request is Type typeRequest))
|
||||
{
|
||||
return new NoSpecimen();
|
||||
}
|
||||
if (!typeof(ISutProvider).IsAssignableFrom(typeRequest))
|
||||
{
|
||||
return new NoSpecimen();
|
||||
}
|
||||
|
||||
return ((ISutProvider)Activator.CreateInstance(typeRequest, _fixture)).Create();
|
||||
}
|
||||
|
||||
return ((ISutProvider)Activator.CreateInstance(typeRequest, _fixture)).Create();
|
||||
}
|
||||
|
||||
public void Customize(IFixture fixture)
|
||||
{
|
||||
_fixture = fixture;
|
||||
fixture.Customizations.Add(this);
|
||||
public void Customize(IFixture fixture)
|
||||
{
|
||||
_fixture = fixture;
|
||||
fixture.Customizations.Add(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user