Gallio.Ambience The Ambience client accesses shared data provided by a remote . Connects the client to the remote server. The client configuration. Thrown if is null. Thrown if the operation failed. Gets the client's data container. Thrown if the client has been disposed. Recognizes and processes the <ambience> configuration section. Example configuration:
]]> The name of the Ambience section: "ambience". Gets the configuration section contents, or a default instance if none available. The configuration section. Describes a problem accessing Gallio Ambience. Creates an exception. Creates an exception. The message. Creates an exception. The message. The inner exception. Creates an exception from serialization info. The serialization info. The streaming context. Provides configuration data for . Gets or sets the database file path. The database file path, the default is a file called Default.db in the Gallio.Ambient subdirectory of the Common Application Data folder. Gets or sets the Ambient server port number. The port number, defaults to 7822. Thrown if the port number is not in the range 1..65535. Gets or sets the Ambient server username and password. The username and password, defaults to an anonymous credential. Thrown if is null. The Ambient object store is a shared lightweight repository for intermediate test data. The Ambient object is like a persistent whiteboard used to pass information from one test to another or to store it for subsequent analysis. The Ambient object store may be used to model the persistent state of the testing environment for end-to-end black-box integration testing. It is particularly useful for decoupling tests that incorporate stateful components such as databases (that are not wiped and restored each time) or time-sensitive processes such as asynchronous jobs. Suppose we are testing a periodic invoicing process. The business requirement dictates that on the last day of each month, an invoice must be generated and delivered electronically to all customers with an outstanding balance in their account. To verify this requirement, we might choose to adopt a combination of unit testing and integration testing methodologies. First, we will write unit tests for each component involved in the invoicing process including the invoice generator, data access code, electronic delivery apparatus, and the periodic job scheduler. During unit testing, we will probably replace the periodic job scheduler with a mock or stub implementation that simulates the end-of-month trigger mechanism. This is fast and quite effective. Next, for additional confidence we will want to verify that the system works completely as an integrated whole. Perhaps the job scheduling mechanism is built on 3rd party tools that must be correctly configured for the environment. In this situation, we might consider implementing an end-to-end system test with nothing mocked out. We can implement an end-to-end test like this: Write a few test scripts that are scheduled to run on a regular basis and that generate transactions that will be reflected in the invoices. For each transaction, such as creating a new account or purchasing a service, the scripts should make a record in the object store. Write a few more test scripts that are scheduled to run after the invoicing process occurs. They should verify the contents of the invoices based on previously stored records in the object store. Of course, in this example it can take up to a month to obtain confirmation that the invoicing process functioned as expected. Consequently, we should not rely on this approach exclusively for our testing purposes. Nevertheless, it may be useful as part of an on-going Quality Assurance audit. Gets the default ambient data container. Thrown if the operation failed. Gets or sets the default client configuration. The default client configuration. The initial value is populated from the contents of the Ambience configuration section in the application's or test's configuration file. See also . Thrown if is null. Extension methods for LINQ syntax over Ambient data containers. Obtains a query over a data container. Client code will not call this method directly. However, it turns out that the C# compiler will add an implicit call to this method when it attempts to select a value from the container using LINQ syntax. The result type. The container. The query object. Extension methods for LINQ syntax over Ambient data queries. Counts the number of objects produced by the query. The type of object being queried. The query. The number of objects. Produces a new query to select a projection of a component of another query. The type of object being queried. The projection result type. The query. The selection expression. The projected query. Produces a new query to filter another query by a criteria. The type of object being queried. The query. The filter expression. The filtered query. Produces a new query ordered by a comparison expression in ascending order. The type of object being queried. The sort key type. The query. The sort comparison expression. The ordered query. Produces a new query ordered by a comparison expression in descending order. The type of object being queried. The sort key type. The query. The sort comparison expression. The ordered query. Produces a new query ordered by an additional comparison expression in ascending order. The type of object being queried. The sort key type. The query. The sort comparison expression. The ordered query. Produces a new query ordered by an additional comparison expression in descending order. The type of object being queried. The sort key type. The query. The sort comparison expression. The ordered query. Represents a container of Ambient data and providers operations to query, store and update its contents. Gets all objects of a particular type in the container. The object type. The data set. Thrown if the operation failed. Gets all objects of a particular type in the container that match a particular filtering criteria. The object type. The filtering criteria. The data set. Thrown if the operation failed. Deletes the object from the container. The object to delete. Thrown if the operation failed. Stores or updates an object in the container. The object to store. Thrown if the operation failed. Deletes all objects in the container. Use with caution! Thrown if the operation failed. Represents a lazily evaluated query over Ambient data for use with the LINQ query syntax. Provides configuration data for . Gets or sets the Ambient server hostname. The hostname, defaults to "localhost". Thrown if is null. Thrown if is empty. Gets or sets the Ambient server port number. The port number, defaults to 7822. Thrown if the port number is not in the range 1..65535. Gets or sets the Ambient server username and password. The username and password, defaults to an anonymous credential. Thrown if is null. A data set containing Ambient objects. Provides information from the Ambience configuration section. Gets the default port number for the Ambient server. Gets the default port number for the Ambient server as a string. Gets the default database file name. Facade over . Creates a wrapper for a Db4o object container. The inner container. Gets the Db4o object container. Facade over . The query result type. Creates a wrapper for a Db4o query. The inner query. Gets the Db4o query object. This wrapper reinterprets Db4o exceptions as Ambience exceptions so that the client can catch them in a meaningful way. Db4o is internalized by Ambience so its exception types are not accessible to clients. The item type. The Gallio.Ambience namespace provides a lightweight object database based on db4o for storing test data across test runs. The Ambience server provides shared data to remote s. Creates an ambient server with parameters initialized to defaults. The server configuration. Thrown if is null. Stops and disposes the server. Starts the server. Thrown if the server has already been started. Thrown if the server has been disposed. Thrown if the operation failed. Stops the server. Does nothing if the server has already been stopped. Thrown if the server has been disposed. Stops and disposes the server. True if disposing. A strongly-typed resource class, for looking up localized strings, etc. Returns the cached ResourceManager instance used by this class. Overrides the current thread's CurrentUICulture property for all resource lookups using this strongly typed resource class. Looks up a localized string similar to An error occurred while accessing the query result set..