예제 #1
0
 public void SetUp()
 {
     _container = new AutoMocker();
     _container.Use(MockMyAccountUrlProviderFactory.Create());
     _container.Use(MockViewModelMapperFactory.Create(typeof(ChangePasswordViewModel).Assembly));
     _container.Use(MockMembershipProviderFactory.Create());
     _container.Use(MockMembershipFactory.Create(_container.Get <MembershipProvider>()));
 }
        public void SetUp()
        {
            _container = new AutoMocker();
            _container.Use(new Mock <IMembershipProxy>(MockBehavior.Strict));
            _container.Use(MockViewModelMapperFactory.Create(typeof(CreateAccountViewModel).Assembly));
            _container.Use(MockMembershipProviderFactory.Create());
            _container.Use(MockMembershipFactory.Create(_container.Get <MembershipProvider>()));

            _container.GetMock <MembershipProvider>()
            .SetupGet(m => m.MinRequiredPasswordLength)
            .Returns(GetRandom.PositiveInt())
            .Verifiable();
        }
예제 #3
0
        public void SetUp()
        {
            _container = new AutoMocker();
            _container.Use(new Mock <ICustomerRepository>(MockBehavior.Strict));
            _container.Use(MockMembershipProviderFactory.Create());
            _container.Use(MockMembershipFactory.Create(_container.Get <MembershipProvider>()));

            _container.GetMock <MembershipProvider>()
            .SetupGet(m => m.MinRequiredPasswordLength)
            .Returns(GetRandom.Int)
            .Verifiable();

            _container.GetMock <MembershipProvider>()
            .SetupGet(m => m.MinRequiredNonAlphanumericCharacters)
            .Returns(GetRandom.Int)
            .Verifiable("Regex must be based on this value");
        }