# Class TMockInternetAccess

Description
Hierarchy
Fields
Methods
Properties

## Unit

mockinternetaccess

## Declaration

`type TMockInternetAccess = class(TInternetAccess)`

## Description

This class simulates an internet access, e.g. for unit tests

There are three ways to use it:

- Just use it, without any changes. Then it will simulate a server returning DefaultMockPage on every request

- Assign a method to the event OnTransfer, which will be called by every request, and simulate whatever you want

- Assign a path to SimulatedServerPath, then it will simulate a server, returning the files from that directory

## Hierarchy

- TObject
- TInternetAccess
- TMockInternetAccess

## Overview

### Fields

| `OnTransfer: TMockTransfer;`
| `SimulatedServerPath: string;`

### Methods

| `constructor create(); override;`
| `constructor create(const internetConfig: TInternetConfig); override;`
| `procedure doTransferUnChecked(var transfer: TTransfer); override;`
| `destructor Destroy; override;`

## Description

### Fields

| `OnTransfer: TMockTransfer;`

| `SimulatedServerPath: string;`

### Methods

| `constructor create(); override;`

| `constructor create(const internetConfig: TInternetConfig); override;`

| `procedure doTransferUnChecked(var transfer: TTransfer); override;`

| `destructor Destroy; override;`

Generated by PasDoc 0.16.0.