2012-08-13 10:04:31 -01:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
using Umbraco.Core.IO;
|
2014-03-18 11:40:20 +11:00
|
|
|
|
|
2012-08-13 10:04:31 -01:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Tests.IO
|
|
|
|
|
|
{
|
2013-02-21 23:07:37 +06:00
|
|
|
|
[TestFixture, RequiresSTA]
|
2012-08-13 10:04:31 -01:00
|
|
|
|
internal class PhysicalFileSystemTests : AbstractFileSystemTests
|
|
|
|
|
|
{
|
|
|
|
|
|
public PhysicalFileSystemTests()
|
2013-02-21 23:07:37 +06:00
|
|
|
|
: base(new PhysicalFileSystem(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "FileSysTests"),
|
2012-08-13 10:04:31 -01:00
|
|
|
|
"/Media/"))
|
|
|
|
|
|
{ }
|
|
|
|
|
|
|
2013-02-21 23:07:37 +06:00
|
|
|
|
[SetUp]
|
|
|
|
|
|
public void Setup()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TearDown]
|
|
|
|
|
|
public void TearDown()
|
|
|
|
|
|
{
|
2013-02-21 23:47:16 +06:00
|
|
|
|
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "FileSysTests");
|
|
|
|
|
|
var files = Directory.GetFiles(path);
|
|
|
|
|
|
foreach (var f in files)
|
|
|
|
|
|
{
|
|
|
|
|
|
File.Delete(f);
|
|
|
|
|
|
}
|
|
|
|
|
|
Directory.Delete(path, true);
|
2013-02-21 23:07:37 +06:00
|
|
|
|
}
|
|
|
|
|
|
|
2012-08-13 10:04:31 -01:00
|
|
|
|
protected override string ConstructUrl(string path)
|
|
|
|
|
|
{
|
|
|
|
|
|
return "/Media/" + path;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|