mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
Run formatting (#2230)
This commit is contained in:
@ -1,21 +1,20 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class CipherCompare : IEqualityComparer<Cipher>
|
||||
{
|
||||
public bool Equals(Cipher x, Cipher y)
|
||||
{
|
||||
return x.Type == y.Type &&
|
||||
x.Data == y.Data &&
|
||||
x.Favorites == y.Favorites &&
|
||||
x.Attachments == y.Attachments;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Cipher obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class CipherCompare : IEqualityComparer<Cipher>
|
||||
{
|
||||
public bool Equals(Cipher x, Cipher y)
|
||||
{
|
||||
return x.Type == y.Type &&
|
||||
x.Data == y.Data &&
|
||||
x.Favorites == y.Favorites &&
|
||||
x.Attachments == y.Attachments;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Cipher obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,18 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class CollectionCompare : IEqualityComparer<Collection>
|
||||
{
|
||||
public bool Equals(Collection x, Collection y)
|
||||
{
|
||||
return x.Name == y.Name &&
|
||||
x.ExternalId == y.ExternalId;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Collection obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class CollectionCompare : IEqualityComparer<Collection>
|
||||
{
|
||||
public bool Equals(Collection x, Collection y)
|
||||
{
|
||||
return x.Name == y.Name &&
|
||||
x.ExternalId == y.ExternalId;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Collection obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,21 +1,20 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class DeviceCompare : IEqualityComparer<Device>
|
||||
{
|
||||
public bool Equals(Device x, Device y)
|
||||
{
|
||||
return x.Name == y.Name &&
|
||||
x.Type == y.Type &&
|
||||
x.Identifier == y.Identifier &&
|
||||
x.PushToken == y.PushToken;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Device obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class DeviceCompare : IEqualityComparer<Device>
|
||||
{
|
||||
public bool Equals(Device x, Device y)
|
||||
{
|
||||
return x.Name == y.Name &&
|
||||
x.Type == y.Type &&
|
||||
x.Identifier == y.Identifier &&
|
||||
x.PushToken == y.PushToken;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Device obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,23 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class EmergencyAccessCompare : IEqualityComparer<EmergencyAccess>
|
||||
{
|
||||
public bool Equals(EmergencyAccess x, EmergencyAccess y)
|
||||
{
|
||||
return x.Email == y.Email &&
|
||||
x.KeyEncrypted == y.KeyEncrypted &&
|
||||
x.Type == y.Type &&
|
||||
x.Status == y.Status &&
|
||||
x.WaitTimeDays == y.WaitTimeDays &&
|
||||
x.RecoveryInitiatedDate == y.RecoveryInitiatedDate &&
|
||||
x.LastNotificationDate == y.LastNotificationDate;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] EmergencyAccess obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class EmergencyAccessCompare : IEqualityComparer<EmergencyAccess>
|
||||
{
|
||||
public bool Equals(EmergencyAccess x, EmergencyAccess y)
|
||||
{
|
||||
return x.Email == y.Email &&
|
||||
x.KeyEncrypted == y.KeyEncrypted &&
|
||||
x.Type == y.Type &&
|
||||
x.Status == y.Status &&
|
||||
x.WaitTimeDays == y.WaitTimeDays &&
|
||||
x.RecoveryInitiatedDate == y.RecoveryInitiatedDate &&
|
||||
x.LastNotificationDate == y.LastNotificationDate;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] EmergencyAccess obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,19 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class EventCompare : IEqualityComparer<Event>
|
||||
{
|
||||
public bool Equals(Event x, Event y)
|
||||
{
|
||||
return x.Date.ToShortDateString() == y.Date.ToShortDateString() &&
|
||||
x.Type == y.Type &&
|
||||
x.IpAddress == y.IpAddress;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Event obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class EventCompare : IEqualityComparer<Event>
|
||||
{
|
||||
public bool Equals(Event x, Event y)
|
||||
{
|
||||
return x.Date.ToShortDateString() == y.Date.ToShortDateString() &&
|
||||
x.Type == y.Type &&
|
||||
x.IpAddress == y.IpAddress;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Event obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,17 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class FolderCompare : IEqualityComparer<Folder>
|
||||
{
|
||||
public bool Equals(Folder x, Folder y)
|
||||
{
|
||||
return x.Name == y.Name;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Folder obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class FolderCompare : IEqualityComparer<Folder>
|
||||
{
|
||||
public bool Equals(Folder x, Folder y)
|
||||
{
|
||||
return x.Name == y.Name;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Folder obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,25 +1,24 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class GrantCompare : IEqualityComparer<Grant>
|
||||
{
|
||||
public bool Equals(Grant x, Grant y)
|
||||
{
|
||||
return x.Key == y.Key &&
|
||||
x.Type == y.Type &&
|
||||
x.SubjectId == y.SubjectId &&
|
||||
x.ClientId == y.ClientId &&
|
||||
x.Description == y.Description &&
|
||||
x.ExpirationDate == y.ExpirationDate &&
|
||||
x.ConsumedDate == y.ConsumedDate &&
|
||||
x.Data == y.Data;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Grant obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class GrantCompare : IEqualityComparer<Grant>
|
||||
{
|
||||
public bool Equals(Grant x, Grant y)
|
||||
{
|
||||
return x.Key == y.Key &&
|
||||
x.Type == y.Type &&
|
||||
x.SubjectId == y.SubjectId &&
|
||||
x.ClientId == y.ClientId &&
|
||||
x.Description == y.Description &&
|
||||
x.ExpirationDate == y.ExpirationDate &&
|
||||
x.ConsumedDate == y.ConsumedDate &&
|
||||
x.Data == y.Data;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Grant obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,19 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class GroupCompare : IEqualityComparer<Group>
|
||||
{
|
||||
public bool Equals(Group x, Group y)
|
||||
{
|
||||
return x.Name == y.Name &&
|
||||
x.AccessAll == y.AccessAll &&
|
||||
x.ExternalId == y.ExternalId;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Group obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class GroupCompare : IEqualityComparer<Group>
|
||||
{
|
||||
public bool Equals(Group x, Group y)
|
||||
{
|
||||
return x.Name == y.Name &&
|
||||
x.AccessAll == y.AccessAll &&
|
||||
x.ExternalId == y.ExternalId;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Group obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,19 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class InstallationCompare : IEqualityComparer<Installation>
|
||||
{
|
||||
public bool Equals(Installation x, Installation y)
|
||||
{
|
||||
return x.Email == y.Email &&
|
||||
x.Key == y.Key &&
|
||||
x.Enabled == y.Enabled;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Installation obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class InstallationCompare : IEqualityComparer<Installation>
|
||||
{
|
||||
public bool Equals(Installation x, Installation y)
|
||||
{
|
||||
return x.Email == y.Email &&
|
||||
x.Key == y.Key &&
|
||||
x.Enabled == y.Enabled;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Installation obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,54 +1,53 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class OrganizationCompare : IEqualityComparer<Organization>
|
||||
{
|
||||
public bool Equals(Organization x, Organization y)
|
||||
{
|
||||
var a = x.ExpirationDate.ToString();
|
||||
var b = y.ExpirationDate.ToString();
|
||||
return x.Identifier.Equals(y.Identifier) &&
|
||||
x.Name.Equals(y.Name) &&
|
||||
x.BusinessName.Equals(y.BusinessName) &&
|
||||
x.BusinessAddress1.Equals(y.BusinessAddress1) &&
|
||||
x.BusinessAddress2.Equals(y.BusinessAddress2) &&
|
||||
x.BusinessAddress3.Equals(y.BusinessAddress3) &&
|
||||
x.BusinessCountry.Equals(y.BusinessCountry) &&
|
||||
x.BusinessTaxNumber.Equals(y.BusinessTaxNumber) &&
|
||||
x.BillingEmail.Equals(y.BillingEmail) &&
|
||||
x.Plan.Equals(y.Plan) &&
|
||||
x.PlanType.Equals(y.PlanType) &&
|
||||
x.Seats.Equals(y.Seats) &&
|
||||
x.MaxCollections.Equals(y.MaxCollections) &&
|
||||
x.UsePolicies.Equals(y.UsePolicies) &&
|
||||
x.UseSso.Equals(y.UseSso) &&
|
||||
x.UseKeyConnector.Equals(y.UseKeyConnector) &&
|
||||
x.UseScim.Equals(y.UseScim) &&
|
||||
x.UseGroups.Equals(y.UseGroups) &&
|
||||
x.UseDirectory.Equals(y.UseDirectory) &&
|
||||
x.UseEvents.Equals(y.UseEvents) &&
|
||||
x.UseTotp.Equals(y.UseTotp) &&
|
||||
x.Use2fa.Equals(y.Use2fa) &&
|
||||
x.UseApi.Equals(y.UseApi) &&
|
||||
x.SelfHost.Equals(y.SelfHost) &&
|
||||
x.UsersGetPremium.Equals(y.UsersGetPremium) &&
|
||||
x.Storage.Equals(y.Storage) &&
|
||||
x.MaxStorageGb.Equals(y.MaxStorageGb) &&
|
||||
x.Gateway.Equals(y.Gateway) &&
|
||||
x.GatewayCustomerId.Equals(y.GatewayCustomerId) &&
|
||||
x.GatewaySubscriptionId.Equals(y.GatewaySubscriptionId) &&
|
||||
x.ReferenceData.Equals(y.ReferenceData) &&
|
||||
x.Enabled.Equals(y.Enabled) &&
|
||||
x.LicenseKey.Equals(y.LicenseKey) &&
|
||||
x.TwoFactorProviders.Equals(y.TwoFactorProviders) &&
|
||||
x.ExpirationDate.ToString().Equals(y.ExpirationDate.ToString());
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Organization obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class OrganizationCompare : IEqualityComparer<Organization>
|
||||
{
|
||||
public bool Equals(Organization x, Organization y)
|
||||
{
|
||||
var a = x.ExpirationDate.ToString();
|
||||
var b = y.ExpirationDate.ToString();
|
||||
return x.Identifier.Equals(y.Identifier) &&
|
||||
x.Name.Equals(y.Name) &&
|
||||
x.BusinessName.Equals(y.BusinessName) &&
|
||||
x.BusinessAddress1.Equals(y.BusinessAddress1) &&
|
||||
x.BusinessAddress2.Equals(y.BusinessAddress2) &&
|
||||
x.BusinessAddress3.Equals(y.BusinessAddress3) &&
|
||||
x.BusinessCountry.Equals(y.BusinessCountry) &&
|
||||
x.BusinessTaxNumber.Equals(y.BusinessTaxNumber) &&
|
||||
x.BillingEmail.Equals(y.BillingEmail) &&
|
||||
x.Plan.Equals(y.Plan) &&
|
||||
x.PlanType.Equals(y.PlanType) &&
|
||||
x.Seats.Equals(y.Seats) &&
|
||||
x.MaxCollections.Equals(y.MaxCollections) &&
|
||||
x.UsePolicies.Equals(y.UsePolicies) &&
|
||||
x.UseSso.Equals(y.UseSso) &&
|
||||
x.UseKeyConnector.Equals(y.UseKeyConnector) &&
|
||||
x.UseScim.Equals(y.UseScim) &&
|
||||
x.UseGroups.Equals(y.UseGroups) &&
|
||||
x.UseDirectory.Equals(y.UseDirectory) &&
|
||||
x.UseEvents.Equals(y.UseEvents) &&
|
||||
x.UseTotp.Equals(y.UseTotp) &&
|
||||
x.Use2fa.Equals(y.Use2fa) &&
|
||||
x.UseApi.Equals(y.UseApi) &&
|
||||
x.SelfHost.Equals(y.SelfHost) &&
|
||||
x.UsersGetPremium.Equals(y.UsersGetPremium) &&
|
||||
x.Storage.Equals(y.Storage) &&
|
||||
x.MaxStorageGb.Equals(y.MaxStorageGb) &&
|
||||
x.Gateway.Equals(y.Gateway) &&
|
||||
x.GatewayCustomerId.Equals(y.GatewayCustomerId) &&
|
||||
x.GatewaySubscriptionId.Equals(y.GatewaySubscriptionId) &&
|
||||
x.ReferenceData.Equals(y.ReferenceData) &&
|
||||
x.Enabled.Equals(y.Enabled) &&
|
||||
x.LicenseKey.Equals(y.LicenseKey) &&
|
||||
x.TwoFactorProviders.Equals(y.TwoFactorProviders) &&
|
||||
x.ExpirationDate.ToString().Equals(y.ExpirationDate.ToString());
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Organization obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +1,22 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class OrganizationSponsorshipCompare : IEqualityComparer<OrganizationSponsorship>
|
||||
{
|
||||
public bool Equals(OrganizationSponsorship x, OrganizationSponsorship y)
|
||||
{
|
||||
return x.SponsoringOrganizationId.Equals(y.SponsoringOrganizationId) &&
|
||||
x.SponsoringOrganizationUserId.Equals(y.SponsoringOrganizationUserId) &&
|
||||
x.SponsoredOrganizationId.Equals(y.SponsoredOrganizationId) &&
|
||||
x.OfferedToEmail.Equals(y.OfferedToEmail) &&
|
||||
x.ToDelete.Equals(y.ToDelete) &&
|
||||
x.ValidUntil.ToString().Equals(y.ValidUntil.ToString());
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] OrganizationSponsorship obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class OrganizationSponsorshipCompare : IEqualityComparer<OrganizationSponsorship>
|
||||
{
|
||||
public bool Equals(OrganizationSponsorship x, OrganizationSponsorship y)
|
||||
{
|
||||
return x.SponsoringOrganizationId.Equals(y.SponsoringOrganizationId) &&
|
||||
x.SponsoringOrganizationUserId.Equals(y.SponsoringOrganizationUserId) &&
|
||||
x.SponsoredOrganizationId.Equals(y.SponsoredOrganizationId) &&
|
||||
x.OfferedToEmail.Equals(y.OfferedToEmail) &&
|
||||
x.ToDelete.Equals(y.ToDelete) &&
|
||||
x.ValidUntil.ToString().Equals(y.ValidUntil.ToString());
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] OrganizationSponsorship obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,23 +1,22 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class OrganizationUserCompare : IEqualityComparer<OrganizationUser>
|
||||
{
|
||||
public bool Equals(OrganizationUser x, OrganizationUser y)
|
||||
{
|
||||
return x.Email == y.Email &&
|
||||
x.Status == y.Status &&
|
||||
x.Type == y.Type &&
|
||||
x.AccessAll == y.AccessAll &&
|
||||
x.ExternalId == y.ExternalId &&
|
||||
x.Permissions == y.Permissions;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] OrganizationUser obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class OrganizationUserCompare : IEqualityComparer<OrganizationUser>
|
||||
{
|
||||
public bool Equals(OrganizationUser x, OrganizationUser y)
|
||||
{
|
||||
return x.Email == y.Email &&
|
||||
x.Status == y.Status &&
|
||||
x.Type == y.Type &&
|
||||
x.AccessAll == y.AccessAll &&
|
||||
x.ExternalId == y.ExternalId &&
|
||||
x.Permissions == y.Permissions;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] OrganizationUser obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,29 +1,28 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class PolicyCompare : IEqualityComparer<Policy>
|
||||
{
|
||||
public bool Equals(Policy x, Policy y)
|
||||
{
|
||||
return x.Type == y.Type &&
|
||||
x.Data == y.Data &&
|
||||
x.Enabled == y.Enabled;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Policy obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class PolicyCompare : IEqualityComparer<Policy>
|
||||
{
|
||||
public bool Equals(Policy x, Policy y)
|
||||
{
|
||||
return x.Type == y.Type &&
|
||||
x.Data == y.Data &&
|
||||
x.Enabled == y.Enabled;
|
||||
}
|
||||
|
||||
public class PolicyCompareIncludingOrganization : PolicyCompare
|
||||
public int GetHashCode([DisallowNull] Policy obj)
|
||||
{
|
||||
public new bool Equals(Policy x, Policy y)
|
||||
{
|
||||
return base.Equals(x, y) &&
|
||||
x.OrganizationId == y.OrganizationId;
|
||||
}
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
public class PolicyCompareIncludingOrganization : PolicyCompare
|
||||
{
|
||||
public new bool Equals(Policy x, Policy y)
|
||||
{
|
||||
return base.Equals(x, y) &&
|
||||
x.OrganizationId == y.OrganizationId;
|
||||
}
|
||||
}
|
||||
|
@ -1,27 +1,26 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class SendCompare : IEqualityComparer<Send>
|
||||
{
|
||||
public bool Equals(Send x, Send y)
|
||||
{
|
||||
return x.Type == y.Type &&
|
||||
x.Data == y.Data &&
|
||||
x.Key == y.Key &&
|
||||
x.Password == y.Password &&
|
||||
x.MaxAccessCount == y.MaxAccessCount &&
|
||||
x.AccessCount == y.AccessCount &&
|
||||
x.ExpirationDate?.ToShortDateString() == y.ExpirationDate?.ToShortDateString() &&
|
||||
x.DeletionDate.ToShortDateString() == y.DeletionDate.ToShortDateString() &&
|
||||
x.Disabled == y.Disabled &&
|
||||
x.HideEmail == y.HideEmail;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Send obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class SendCompare : IEqualityComparer<Send>
|
||||
{
|
||||
public bool Equals(Send x, Send y)
|
||||
{
|
||||
return x.Type == y.Type &&
|
||||
x.Data == y.Data &&
|
||||
x.Key == y.Key &&
|
||||
x.Password == y.Password &&
|
||||
x.MaxAccessCount == y.MaxAccessCount &&
|
||||
x.AccessCount == y.AccessCount &&
|
||||
x.ExpirationDate?.ToShortDateString() == y.ExpirationDate?.ToShortDateString() &&
|
||||
x.DeletionDate.ToShortDateString() == y.DeletionDate.ToShortDateString() &&
|
||||
x.Disabled == y.Disabled &&
|
||||
x.HideEmail == y.HideEmail;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Send obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,19 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class SsoConfigCompare : IEqualityComparer<SsoConfig>
|
||||
{
|
||||
public bool Equals(SsoConfig x, SsoConfig y)
|
||||
{
|
||||
return x.Enabled == y.Enabled &&
|
||||
x.OrganizationId == y.OrganizationId &&
|
||||
x.Data == y.Data;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] SsoConfig obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class SsoConfigCompare : IEqualityComparer<SsoConfig>
|
||||
{
|
||||
public bool Equals(SsoConfig x, SsoConfig y)
|
||||
{
|
||||
return x.Enabled == y.Enabled &&
|
||||
x.OrganizationId == y.OrganizationId &&
|
||||
x.Data == y.Data;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] SsoConfig obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,17 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class SsoUserCompare : IEqualityComparer<SsoUser>
|
||||
{
|
||||
public bool Equals(SsoUser x, SsoUser y)
|
||||
{
|
||||
return x.ExternalId == y.ExternalId;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] SsoUser obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class SsoUserCompare : IEqualityComparer<SsoUser>
|
||||
{
|
||||
public bool Equals(SsoUser x, SsoUser y)
|
||||
{
|
||||
return x.ExternalId == y.ExternalId;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] SsoUser obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +1,21 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class TaxRateCompare : IEqualityComparer<TaxRate>
|
||||
{
|
||||
public bool Equals(TaxRate x, TaxRate y)
|
||||
{
|
||||
return x.Country == y.Country &&
|
||||
x.State == y.State &&
|
||||
x.PostalCode == y.PostalCode &&
|
||||
x.Rate == y.Rate &&
|
||||
x.Active == y.Active;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] TaxRate obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class TaxRateCompare : IEqualityComparer<TaxRate>
|
||||
{
|
||||
public bool Equals(TaxRate x, TaxRate y)
|
||||
{
|
||||
return x.Country == y.Country &&
|
||||
x.State == y.State &&
|
||||
x.PostalCode == y.PostalCode &&
|
||||
x.Rate == y.Rate &&
|
||||
x.Active == y.Active;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] TaxRate obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,23 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class TransactionCompare : IEqualityComparer<Transaction>
|
||||
{
|
||||
public bool Equals(Transaction x, Transaction y)
|
||||
{
|
||||
return x.Type == y.Type &&
|
||||
x.Amount == y.Amount &&
|
||||
x.Refunded == y.Refunded &&
|
||||
x.Details == y.Details &&
|
||||
x.PaymentMethodType == y.PaymentMethodType &&
|
||||
x.Gateway == y.Gateway &&
|
||||
x.GatewayId == y.GatewayId;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] Transaction obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class TransactionCompare : IEqualityComparer<Transaction>
|
||||
{
|
||||
public bool Equals(Transaction x, Transaction y)
|
||||
{
|
||||
return x.Type == y.Type &&
|
||||
x.Amount == y.Amount &&
|
||||
x.Refunded == y.Refunded &&
|
||||
x.Details == y.Details &&
|
||||
x.PaymentMethodType == y.PaymentMethodType &&
|
||||
x.Gateway == y.Gateway &&
|
||||
x.GatewayId == y.GatewayId;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] Transaction obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,40 +1,39 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Entities;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class UserCompare : IEqualityComparer<User>
|
||||
{
|
||||
public bool Equals(User x, User y)
|
||||
{
|
||||
return x.Name == y.Name &&
|
||||
x.Email == y.Email &&
|
||||
x.EmailVerified == y.EmailVerified &&
|
||||
x.MasterPassword == y.MasterPassword &&
|
||||
x.MasterPasswordHint == y.MasterPasswordHint &&
|
||||
x.Culture == y.Culture &&
|
||||
x.SecurityStamp == y.SecurityStamp &&
|
||||
x.TwoFactorProviders == y.TwoFactorProviders &&
|
||||
x.TwoFactorRecoveryCode == y.TwoFactorRecoveryCode &&
|
||||
x.EquivalentDomains == y.EquivalentDomains &&
|
||||
x.Key == y.Key &&
|
||||
x.PublicKey == y.PublicKey &&
|
||||
x.PrivateKey == y.PrivateKey &&
|
||||
x.Premium == y.Premium &&
|
||||
x.Storage == y.Storage &&
|
||||
x.MaxStorageGb == y.MaxStorageGb &&
|
||||
x.Gateway == y.Gateway &&
|
||||
x.GatewayCustomerId == y.GatewayCustomerId &&
|
||||
x.ReferenceData == y.ReferenceData &&
|
||||
x.LicenseKey == y.LicenseKey &&
|
||||
x.ApiKey == y.ApiKey &&
|
||||
x.Kdf == y.Kdf &&
|
||||
x.KdfIterations == y.KdfIterations;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] User obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class UserCompare : IEqualityComparer<User>
|
||||
{
|
||||
public bool Equals(User x, User y)
|
||||
{
|
||||
return x.Name == y.Name &&
|
||||
x.Email == y.Email &&
|
||||
x.EmailVerified == y.EmailVerified &&
|
||||
x.MasterPassword == y.MasterPassword &&
|
||||
x.MasterPasswordHint == y.MasterPasswordHint &&
|
||||
x.Culture == y.Culture &&
|
||||
x.SecurityStamp == y.SecurityStamp &&
|
||||
x.TwoFactorProviders == y.TwoFactorProviders &&
|
||||
x.TwoFactorRecoveryCode == y.TwoFactorRecoveryCode &&
|
||||
x.EquivalentDomains == y.EquivalentDomains &&
|
||||
x.Key == y.Key &&
|
||||
x.PublicKey == y.PublicKey &&
|
||||
x.PrivateKey == y.PrivateKey &&
|
||||
x.Premium == y.Premium &&
|
||||
x.Storage == y.Storage &&
|
||||
x.MaxStorageGb == y.MaxStorageGb &&
|
||||
x.Gateway == y.Gateway &&
|
||||
x.GatewayCustomerId == y.GatewayCustomerId &&
|
||||
x.ReferenceData == y.ReferenceData &&
|
||||
x.LicenseKey == y.LicenseKey &&
|
||||
x.ApiKey == y.ApiKey &&
|
||||
x.Kdf == y.Kdf &&
|
||||
x.KdfIterations == y.KdfIterations;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] User obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,18 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Bit.Core.Models.Data;
|
||||
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers
|
||||
{
|
||||
public class UserKdfInformationCompare : IEqualityComparer<UserKdfInformation>
|
||||
{
|
||||
public bool Equals(UserKdfInformation x, UserKdfInformation y)
|
||||
{
|
||||
return x.Kdf == y.Kdf &&
|
||||
x.KdfIterations == y.KdfIterations;
|
||||
}
|
||||
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
||||
|
||||
public int GetHashCode([DisallowNull] UserKdfInformation obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
public class UserKdfInformationCompare : IEqualityComparer<UserKdfInformation>
|
||||
{
|
||||
public bool Equals(UserKdfInformation x, UserKdfInformation y)
|
||||
{
|
||||
return x.Kdf == y.Kdf &&
|
||||
x.KdfIterations == y.KdfIterations;
|
||||
}
|
||||
|
||||
public int GetHashCode([DisallowNull] UserKdfInformation obj)
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user