Class TMockInternetAccess

DescriptionHierarchyFieldsMethodsProperties

Unit

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

Overview

Fields

Public OnTransfer: TMockTransfer;
Public SimulatedServerPath: string;

Methods

Public constructor create; override;
Public procedure doTransferUnChecked(method: string; const url: TDecodedUrl; const data: TInternetAccessDataBlock); override;
Public destructor Destroy; override;

Description

Fields

Public OnTransfer: TMockTransfer;
 
Public SimulatedServerPath: string;
 

Methods

Public constructor create; override;
 
Public procedure doTransferUnChecked(method: string; const url: TDecodedUrl; const data: TInternetAccessDataBlock); override;
 
Public destructor Destroy; override;
 

Generated by PasDoc 0.14.0.