MemoryFile Class Reference

Inherits Protocols::Http::File, and Protocols::Http::File.

Inheritance diagram for MemoryFile:

Inheritance graph
[legend]
Collaboration diagram for MemoryFile:

Collaboration graph
[legend]
List of all members.

Detailed Description

Todo:
That is quite a mess now but after a bunch of refactorings we'll get things tidied up a little. We should figure how to do the acceptance testing... it would be similar to a unit test except that the "unit" will be the complete application.
At first we will exclude the UI from the test (we don't have any UI now). I guess we can use the acceptance tests to figure out what the interface of the Services will be. The actual UIs will then be implemented on top of them. We could even be able to keep the same tests while adding the the UIs to the tests. Instead of calling the Services directly, we could write adapters what implement the same interfaces emulate a user clicking buttons or typing in text.

With the acceptance tests we will definitely hit the OS. To make the tests run faster though, we could, for example, under the hood remap all TCP or UDP traffic intended for remote hosts to the local host. That could be done quite simply - we return an AcceptanceSocket wrapper around a TcpSocket. AcceptanceSocket will remap all attempts to connect to "host:port" with a connection to "localhost:localport" and the original "host:port" could be written to the socket, then read from out test server listening on the other site, so that it could try to simulate some behavior.

Definition at line 43 of file main-acceptance.cpp.

Public Member Functions

bool write (const QByteArray &bytes, bool=true)
bool write (const QByteArray &bytes, bool=true)

Public Attributes

QByteArray bytes_


Member Function Documentation

bool MemoryFile::write const QByteArray &  bytes,
bool  = true
[inline, virtual]
 

Implements Protocols::Http::File.

Definition at line 46 of file main.cpp.

bool MemoryFile::write const QByteArray &  bytes,
bool  = true
[inline, virtual]
 

Implements Protocols::Http::File.

Definition at line 46 of file main-acceptance.cpp.


Member Data Documentation

QByteArray MemoryFile::bytes_
 

Definition at line 52 of file main-acceptance.cpp.


The documentation for this class was generated from the following files: