Ejemplo n.º 1
0
        public void TestGetHashPasswordWhenOnlyNumberResultCorrectHash()
        {
            HashingPassword.Init();
            var password    = "******";
            var hash        = GetHash(password);
            var newPassword = HashingPassword.GetHashPassword(password);

            Assert.AreEqual(hash, newPassword);
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            HashingPassword.Init();

            var host = CreateWebHostBuilder(args).Build();

            using (var scope = host.Services.CreateScope())
            {
                var services = scope.ServiceProvider;
                try
                {
                    var context = services.GetRequiredService <ApplicationContext>();
                    DbInitializer.Initialize(context);
                }
                catch (Exception ex)
                {
                    var logger = services.GetRequiredService <ILogger <Program> >();
                    logger.LogError(ex, "An error occurred while seeding the database.");
                }
            }

            host.Run();
        }
Ejemplo n.º 3
0
 public void TestInitClass()
 {
     HashingPassword.Init();
 }
Ejemplo n.º 4
0
 public void Setup()
 {
     HashingPassword.Init();
 }
Ejemplo n.º 5
0
 public void TestMethod1()
 {
     HashingPassword.Init();
     HashingPassword.GetHashPassword("21673781264");
 }