Class GenericGameStateTests
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Tests
Assembly: GameStateTracker.Tests.dll
Syntax
[TestClass]
public class GenericGameStateTests : IDisposable
  Constructors
View SourceGenericGameStateTests()
Declaration
public GenericGameStateTests()
  Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
  TestCleanup()
Declaration
[TestCleanup]
public void TestCleanup()
  TestClearRemovesAllObjectsWithSameClass()
Verify that after clearing a game object from the cache, subsequent calls return a new object.
Declaration
[TestMethod]
public Task TestClearRemovesAllObjectsWithSameClass()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestExistingWithEmptyQuery()
Verify that queries can find an existing game object without any class name or object name.
Declaration
[TestMethod]
public Task TestExistingWithEmptyQuery()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestExistingWithoutClassName()
Verify that queries can find an existing game object without any class name and its full or friendly name.
Declaration
[TestMethod]
public Task TestExistingWithoutClassName()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGameStateAutomaticSubclassMapping()
Verify that base types don't overwrite existing mappings to the subclass type.
Declaration
[TestMethod]
public Task TestGameStateAutomaticSubclassMapping()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGameStateBenchmark()
Declaration
[TestMethod]
[TestCategory("Benchmark")]
public Task TestGameStateBenchmark()
  Returns
| Type | Description | 
|---|---|
| Task | 
TestGameStateClear()
Verify that after clearing a game object from the cache, calling GetAll checks the object repository again.
Declaration
[TestMethod]
public Task TestGameStateClear()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGameStatePropertyIsSet()
Verify that game objects have a GameState property correctly assigned.
Declaration
[TestMethod]
public Task TestGameStatePropertyIsSet()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGameStateWithQueryResultEvent()
Verify that the object repository can fire a GameStateChanged event to update an object's properties.
Declaration
[TestMethod]
public Task TestGameStateWithQueryResultEvent()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGameStateWithQueryResultEventDelayedClassName()
Verify that the class manager converts a game object to the right the C# type, if its class name changes.
Declaration
[TestMethod]
public Task TestGameStateWithQueryResultEventDelayedClassName()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGetFromCache()
Verify that game objects in the cache are re-used for API calls which use the cache.
Declaration
[TestMethod]
public Task TestGetFromCache()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGetFromCacheWithMaxAge()
Verify that game objects in the cache are re-used for API calls which do not use the cache.
Declaration
[TestMethod]
public Task TestGetFromCacheWithMaxAge()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGetSpecificObject()
Verify that queries for a specific class object succeed when an object name is given.
Declaration
[TestMethod]
public Task TestGetSpecificObject()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGetWithBaseClassName()
Verify that queries can retrieve a game object by its base class and its full or friendly name.
Declaration
[TestMethod]
public Task TestGetWithBaseClassName()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGetWithMultipleResultsThrowsException()
Verify that queries for a specific class object fail if there are multiple results.
Declaration
[TestMethod]
public Task TestGetWithMultipleResultsThrowsException()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  | 
      
TestGetWithSingleResult()
Verify that queries for a specific class object succeed if there is only one result.
Declaration
[TestMethod]
public Task TestGetWithSingleResult()
  Returns
| Type | Description | 
|---|---|
| Task | A task that completes when the test is done.  |