Ejemplo n.º 1
0
 public void Setup()
 {
     // arrange
     _mockDbSetUser        = DataBaseMockingHelpers.GetMockDbSetUser();
     _mockDbSetTransaction = DataBaseMockingHelpers.GetMockDbSetTransaction();
     _mockcivMoneyContext  = DataBaseMockingHelpers.GetMockCivMoneyContext(_mockDbSetTransaction, _mockDbSetUser);
     _usersAccessService   =
         new CreateUsers(DataBaseMockingHelpers.GetMockCivMoneyContextFactoryObject(_mockcivMoneyContext.Object));
 }
 public void Setup()
 {
     // arrange
     _mockDbSetUser            = DataBaseMockingHelpers.GetMockDbSetUser();
     _mockDbSetTransaction     = DataBaseMockingHelpers.GetMockDbSetTransaction();
     _mockcivMoneyContext      = DataBaseMockingHelpers.GetMockCivMoneyContext(_mockDbSetTransaction, _mockDbSetUser);
     _transactionsTotalService =
         new TransactionTotals(DataBaseMockingHelpers.GetMockCivMoneyContextFactoryObject(_mockcivMoneyContext.Object));
 }
Ejemplo n.º 3
0
        public void Setup()
        {
            // arrange
            _mockDbSetUser = DataBaseMockingHelpers.GetMockDbSetUser();
            var seededUsers = new List <User>
            {
                new User {
                    Id = 0, Currency = "CHF", PasswordHash = BCryptHelper.HashPassword("password", BCryptHelper.GenerateSalt()), UserName = "******"
                }
            };

            _mockDbSetUser.SetupData(seededUsers);
            _mockDbSetTransaction      = DataBaseMockingHelpers.GetMockDbSetTransaction();
            _mockcivMoneyContext       = DataBaseMockingHelpers.GetMockCivMoneyContext(_mockDbSetTransaction, _mockDbSetUser);
            _userAuthenticationService = new UserAuthentication(DataBaseMockingHelpers.GetMockCivMoneyContextFactoryObject(_mockcivMoneyContext.Object));
        }