Skip to content

Commit

Permalink
Merged in issue/BTLR-63 (pull request #2)
Browse files Browse the repository at this point in the history
Issue/btlr 63

--HG--
branch : dev
  • Loading branch information
Piedone committed Jun 12, 2016
2 parents ae8a959 + 55c337a commit 853a223
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Module.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AntiForgery: enabled
Author: Piedone
Website: https://github.com/Lombiq/Combinator
Version: 2.0
OrchardVersion: 1.10
OrchardVersion: 1.10.1
Description: Combines and minifies external stylesheets and javascript files. Minifications uses the YUI Compressor (http://yuicompressor.codeplex.com/), the original code for sprite generation is from Sprite Generator (http://spritegenerator.codeplex.com/) and stylesheets are parsed with ExCSS (https://github.com/TylerBrinks/ExCSS).
Features:
Piedone.Combinator:
Expand Down
7 changes: 2 additions & 5 deletions Piedone.Combinator.Tests/Piedone.Combinator.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<AssemblyName>Piedone.Combinator.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags></FileUpgradeFlags>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
Expand Down Expand Up @@ -84,10 +85,6 @@
<HintPath>..\..\..\..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NHibernate, Version=4.0.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\NHibernate.4.0.1.4000\lib\net40\NHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
<Private>True</Private>
Expand Down
16 changes: 11 additions & 5 deletions Piedone.Combinator.Tests/Services/CacheFileServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public override void Register(ContainerBuilder builder)
builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
builder.RegisterInstance(_clock).As<IClock>();
builder.RegisterInstance(new Mock<UrlHelper>().Object).As<UrlHelper>();
builder.RegisterType<StubCacheService>().As<ICacheService>();
builder.RegisterType<StubCacheManager>().As<ICacheManager>();

builder.Register(c =>
{
Expand All @@ -74,13 +74,16 @@ public override void Init()
SaveTestResources();
}



/// <summary>
/// This test fails with FileLoadException because of this issue: https://github.com/OrchardCMS/Orchard/issues/6933
/// </summary>
[Test]
public void SaveShouldBePersistent()
{
// Todo: adjust mocking that CombinatorResource's context can be filled and so the GetCombinedResources() method tested
// if it returns the correct data

var storageProvider = _container.Resolve<IStorageProvider>();
Assert.That(storageProvider.GetFile(storageProvider.Combine("_PiedoneModules", storageProvider.Combine("Combinator", storageProvider.Combine("Styles", CacheFileService.ConvertFingerprintToStorageFormat(_cssResourcesFingerprint) + "-1.css")))), Is.Not.Null);

Expand All @@ -94,6 +97,9 @@ public void SaveShouldBePersistent()
Assert.That(_cacheFileService.Exists(_cssResourcesFingerprint, new CombinatorSettings()), Is.True);
}

/// <summary>
/// This test fails with FileLoadException because of this issue: https://github.com/OrchardCMS/Orchard/issues/6933
/// </summary>
[Test]
public void EmtpyShouldDeleteAll()
{
Expand Down Expand Up @@ -224,12 +230,12 @@ public bool FolderExists(string path)
{
return CreatedFiles.Any(p => p.StartsWith(path));
}

public string GetStoragePath(string url)
{
return FileSystemStorageProvider.GetStoragePath(url);
}

public void CopyFile(string originalPath, string duplicatePath)
{
FileSystemStorageProvider.CopyFile(originalPath, duplicatePath);
Expand Down
1 change: 0 additions & 1 deletion Piedone.Combinator.Tests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="Moq" version="4.0.10827" targetFramework="net452" />
<package id="NHibernate" version="4.0.1.4000" targetFramework="net452" />
<package id="NUnit" version="2.5.10.11092" targetFramework="net452" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
</packages>
2 changes: 1 addition & 1 deletion Piedone.Combinator.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down

0 comments on commit 853a223

Please sign in to comment.