Beispiel #1
0
        public StoreUserResponse StoreUser(StoreUserRequest request)
        {
            StoreUserResponse response = new StoreUserResponse();
            SecurityBusinessComponent bc = DependencyInjectionHelper.GetSecurityBusinessComponent();

            User user = SecurityAdapter.DtoToUser(request.User);
            IEnumerable<ChangeItem> changeItems = SecurityAdapter.GetChangeItems(request.User);
            response.Id = bc.StoreUser(user, changeItems);

            return response;
        }
 public void TestStoreUser()
 {
     UserDTO user = new UserDTO();
     user.Id = 123;
     StoreUserResponse response = new StoreUserResponse();
     response.Id = user.Id;
     Expect.Once.On(service).Method("StoreUser").Will(Return.Value(response));
     serviceFacade.StoreUser(user);
 }