Inheritance Hierarchy
DeltaEngine.Tests.Content FakeContentLoaderTests
Namespace: DeltaEngine.Tests.Content
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The FakeContentLoaderTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
FakeContentLoaderTests | Initializes a new instance of the FakeContentLoaderTests class |
Methods
Examples
[Test] public void ContentLoadWithNullStream() { ContentLoader.Load<DynamicXmlMockContent>("XmlContentWithNoPath"); }
[Test] public void ContentLoadWithWrongFilePath() { Assert.Throws<ContentLoader.ContentFileDoesNotExist>( () => ContentLoader.Load<XmlContent>("ContentWithWrongPath")); }
[Test] public void ThrowExceptionIfSecondContentLoaderInstanceIsUsed() { ContentLoader.Exists("abc"); Assert.Throws<ContentLoader.ContentLoaderAlreadyExistsItIsOnlyAllowedToSetBeforeTheAppStarts>( ContentLoader.Use<FakeContentLoader>); }
[Test] public void LoadDefaultDataIfAllowed() { ContentLoader.Load<DynamicXmlMockContent>("UnavailableDynamicContent"); }
[Test] public void CreateDataIfAllowedAndNoContentFoundAndDispose() { var dummy = ContentLoader.Load<DynamicXmlMockContent>("Dummy"); Assert.IsTrue(dummy.InternalAllowCreationIfContentNotFound); Assert.IsFalse(dummy.IsDisposed); dummy.Dispose(); Assert.IsTrue(dummy.IsDisposed); }
See Also