Testing IO storage provider.
Usage example:
[Test]
public void SampleTestMethod()
{
TestStorageProvider provider = TestStorageProvider.GetMappedProvider();
provider.FileObject.ReadAllText("path").ReturnsForAnyArgs("text");
string result = CMS.IO.File.ReadAllText("path");
Assert.AreEqual("text", result);
}
Inheritance Hierarchy
CMS.IO AbstractStorageProvider
CMS.Tests FakeStorageProvider
Namespace: CMS.Tests
Assembly: CMS.Tests (in CMS.Tests.dll) Version: 8.0.0.0 (8.1.5347.20411)
See Also