private AccountData CreateAccountData(ACCOUNTS account) { return(new AccountData() { Id = account.id, AccountName = account.account_name }); }
private void TestResponse(ACCOUNTS account, string username, int expectedCode) { // arrange AccountControllerV1 controller = new AccountControllerV1(_mockService.Object); controller.ControllerContext.HttpContext = MockIdentity(username); // action ObjectResult result = (ObjectResult)controller.Get((int)account).Result; //assert Assert.AreEqual(expectedCode, result.StatusCode); }
private Account Create(ACCOUNTS account) { return(new Account( new AccountId(account.id), account.account_name)); }