public void AccountService_Create()
        {
            RTC_Account account = new RTC_Account();

            account.Email       = "testService";
            account.Password    = "******";
            account.AccountType = 1;
            account.Status      = true;
            account.UserID      = 1;

            mockRepository.Setup(m => m.Add(account)).Returns((RTC_Account p) =>
            {
                p.AccountID = 1;
                return(p);
            }
                                                              );

            accountService.Add(account);
        }
예제 #2
0
        public void AccountRepository_Create()
        {
            RTC_Account account = new RTC_Account();

            account.Email       = "test";
            account.Password    = "******";
            account.AccountType = 1;
            account.Status      = true;
            account.UserID      = 1;

            accountRepository.Add(account);

            var result = accountRepository.Add(account);

            unitOfWork.Commit();

            Assert.IsNotNull(result);
            Assert.AreEqual(7, result.AccountID);
        }
예제 #3
0
 public void Delete(RTC_Account account)
 {
     _accountRepository.Delete(account);
 }
예제 #4
0
 public void Add(RTC_Account account)
 {
     _accountRepository.Add(account);
 }
예제 #5
0
 public void Update(RTC_Account account)
 {
     _accountRepository.Update(account);
 }