FileSettingsTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms TestWithMocksOrVisually
    DeltaEngine.Platforms.Tests FileSettingsTests

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

public class FileSettingsTests : TestWithMocksOrVisually

The FileSettingsTests type exposes the following members.

Constructors

  NameDescription
Public methodFileSettingsTests
Initializes a new instance of the FileSettingsTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodChangeAndSaveSettings
Public methodChangeFileSettings
Public methodCheckDefaultSettings
Public methodCleanup
Public methodInit
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 CheckDefaultSettings()
{
    Assert.AreEqual(false, fileSettings.StartInFullscreen);
    Assert.AreEqual(1.0f, fileSettings.SoundVolume);
    Assert.AreEqual(0.75f, fileSettings.MusicVolume);
    Assert.AreEqual(24, fileSettings.DepthBufferBits);
    Assert.AreEqual(32, fileSettings.ColorBufferBits);
    Assert.AreEqual(0, fileSettings.AntiAliasingSamples);
    Assert.AreEqual(0, fileSettings.LimitFramerate);
    Assert.AreEqual(20, fileSettings.UpdatesPerSecond);
}
[Test, CloseAfterFirstFrame]
public void ChangeAndSaveSettings()
{
    fileSettings.PlayerName = ModifiedPlayerName;
    fileSettings.TwoLetterLanguageName = ModifiedTwoLetterLanguageName;
    fileSettings.Save();
    Assert.IsTrue(File.Exists(SettingsFilePath));
}
[Test]
public void ChangeFileSettings()
{
    fileSettings.StartInFullscreen = true;
    Assert.AreEqual(true, fileSettings.StartInFullscreen);
    fileSettings.StartInFullscreen = false;
}
See Also