Esempio n. 1
0
 public void Initialize()
 {
     this.blogSecurity           = new Mock <IBlogSecurity>();
     this.requestSnapshotService = new MockRequestSnapshotService();
     this.requesterSecurity      = new Mock <IRequesterSecurity>();
     this.requesterSecurity.SetupFor(Requester);
 }
Esempio n. 2
0
 public void Initialize()
 {
     // Give potentially side-effective components strict mock behaviour.
     this.connectionFactory = new Mock <IFifthweekDbConnectionFactory>(MockBehavior.Strict);
     this.requestSnapshot   = new MockRequestSnapshotService();
     this.InitializeTarget(this.connectionFactory.Object);
 }
        public void Initialize()
        {
            this.passwordHasher = new Mock <IPasswordHasher>();
            this.userManager    = new Mock <IUserManager>();
            this.userManager.Setup(v => v.PasswordHasher).Returns(this.passwordHasher.Object);
            this.requestSnapshot = new MockRequestSnapshotService();

            // Required for non-database tests.
            this.target = new UpdateAccountSettingsDbStatement(new Mock <IFifthweekDbConnectionFactory>(MockBehavior.Strict).Object, this.userManager.Object, this.requestSnapshot);
        }
Esempio n. 4
0
        public void Initialize()
        {
            this.requesterSecurity = new Mock <IRequesterSecurity>();
            this.requesterSecurity.SetupFor(Requester);
            this.subscriptionSecurity = new Mock <IBlogSecurity>();
            this.requestSnapshot      = new MockRequestSnapshotService();

            // Give potentially side-effective components strict mock behaviour.
            this.connectionFactory = new Mock <IFifthweekDbConnectionFactory>(MockBehavior.Strict);

            this.InitializeTarget(this.connectionFactory.Object);
        }
        public void TestInitialize()
        {
            this.userManager    = new Mock <IUserManager>();
            this.passwordHasher = new Mock <IPasswordHasher>();
            this.userManager.Setup(v => v.PasswordHasher).Returns(this.passwordHasher.Object);
            this.requestSnapshot = new MockRequestSnapshotService();

            // Give potentially side-effecting components strict mock behaviour.
            this.connectionFactory = new Mock <IFifthweekDbConnectionFactory>(MockBehavior.Strict);

            this.target = new RegisterUserDbStatement(this.userManager.Object, this.connectionFactory.Object, this.requestSnapshot);
        }
Esempio n. 6
0
 public void TestInitialize()
 {
     this.requestSnapshot = new MockRequestSnapshotService();
     this.target          = new UnsubscribeFromChannelDbStatement(new Mock <IFifthweekDbConnectionFactory>(MockBehavior.Strict).Object, this.requestSnapshot);
 }
Esempio n. 7
0
 public void TestInitialize()
 {
     this.requestSnapshot = new MockRequestSnapshotService();
     this.target          = new UpdateFreeAccessUsersDbStatement(new Mock <IFifthweekDbConnectionFactory>(MockBehavior.Strict).Object, this.requestSnapshot);
 }