using Bit.Core.Entities; using Bit.Core.Enums; using Bit.Core.Identity; using Bit.Test.Common.AutoFixture; using Bit.Test.Common.AutoFixture.Attributes; using Xunit; namespace Bit.Core.Test.Identity; public class EmailTokenProviderTests : BaseTokenProviderTests { public override TwoFactorProviderType TwoFactorProviderType => TwoFactorProviderType.Email; public static IEnumerable CanGenerateTwoFactorTokenAsyncData => SetupCanGenerateData( ( new Dictionary { ["Email"] = "test@email.com", }, true ), ( new Dictionary { ["NotEmail"] = "value", }, false ), ( new Dictionary { ["Email"] = "", }, false ) ); [Theory, BitMemberAutoData(nameof(CanGenerateTwoFactorTokenAsyncData))] public override async Task RunCanGenerateTwoFactorTokenAsync(Dictionary metaData, bool expectedResponse, User user, SutProvider sutProvider) { await base.RunCanGenerateTwoFactorTokenAsync(metaData, expectedResponse, user, sutProvider); } }