CameraTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms TestWithMocksOrVisually
    DeltaEngine.Rendering3D.Tests.Cameras CameraTests

Namespace: DeltaEngine.Rendering3D.Tests.Cameras
Assembly: DeltaEngine.Rendering3D.Tests (in DeltaEngine.Rendering3D.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class CameraTests : TestWithMocksOrVisually

The CameraTests type exposes the following members.

Constructors

  NameDescription
Public methodCameraTests
Initializes a new instance of the CameraTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodAfterSetupACameraTheAmbientContextShouldBeInitialized
Public methodCameraShouldBeAbleToHandleViewportChanges
Public methodCreateCamera
Public methodInitializeResolver (Inherited from TestWithMocksOrVisually.)
Protected methodRegisterMock T  (Inherited from TestWithMocksOrVisually.)
Protected methodResolve T  (Inherited from TestWithMocksOrVisually.)
Protected methodRunAfterFirstFrame (Inherited from TestWithMocksOrVisually.)
Public methodRunTestAndDisposeResolverWhenDone (Inherited from TestWithMocksOrVisually.)
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
Examples

[Test, CloseAfterFirstFrame]
public void AfterSetupACameraTheAmbientContextShouldBeInitialized()
{
    Assert.IsTrue(Camera.IsInitialized);
}
[Test, ApproveFirstFrameScreenshot]
public void CameraShouldBeAbleToHandleViewportChanges()
{
    new Grid3D(new Size(5));
    usedDevice = Resolve<Device>();
    usedWindow = Resolve<Window>();
    Matrix originalProjectionMatrix = usedDevice.CameraProjectionMatrix;
    usedWindow.ViewportPixelSize = new Size(400, 300);
    usedDevice.Set3DMode();
    Assert.AreNotEqual(originalProjectionMatrix, usedDevice.CameraProjectionMatrix);
}
See Also