Inheritance: BaseValidator, IAccountValidator
コード例 #1
0
        public AccountValidatorTests()
        {
            context = new TestingContext();
            hasher = Substitute.For<IHasher>();
            hasher.VerifyPassword(Arg.Any<String>(), Arg.Any<String>()).Returns(true);

            context.DropData();
            SetUpData();

            validator = new AccountValidator(new UnitOfWork(context), hasher);
            validator.CurrentAccountId = account.Id;
        }
コード例 #2
0
        public AccountValidatorTests()
        {
            context = new TestingContext();
            hasher = Substitute.For<IHasher>();
            hasher.VerifyPassword(Arg.Any<String>(), Arg.Any<String>()).Returns(true);

            validator = new AccountValidator(new UnitOfWork(context), hasher);
            validator.ModelState = new ModelStateDictionary();

            TearDownData();
            SetUpData();
        }