Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiXHelper: fixed typos in WiXDir.ToString #1120

Merged
merged 1 commit into from Feb 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/FakeLib/WiXHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ type WiXDir =
Files : WiXFile seq
Components : WiXComponent seq
}
override d.ToString() = sprintf "<Direcotry Id=\"%s\" Name=\"%s\>%s%s</Directory>"
override d.ToString() = sprintf "<Directory Id=\"%s\" Name=\"%s\">%s%s</Directory>"
d.Id d.Name (Seq.fold(fun acc elem -> acc + elem.ToString()) "" d.Files) (Seq.fold(fun acc elem -> acc + elem.ToString()) "" d.Components)

/// Defaults for directories
Expand Down
1 change: 1 addition & 0 deletions src/test/Test.FAKECore/Test.FAKECore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<Compile Include="MessageFiles\MessageFileSpecs.cs" />
<Compile Include="ConfigFiles\ConfigSpecs.cs" />
<Compile Include="AssemblyInfoSpecs.cs" />
<Compile Include="WiXHelperSpec.cs" />
<Compile Include="XdtSpecs.cs" />
<Compile Include="CscSpecs.cs" />
<Compile Include="XmlSpecs.cs" />
Expand Down
33 changes: 33 additions & 0 deletions src/test/Test.FAKECore/WiXHelperSpec.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// ReSharper disable InconsistentNaming
// ReSharper disable CheckNamespace

using System;
using Fake;
using FSharp.Testing;
using Machine.Specifications;
using Microsoft.FSharp.Core;

namespace Test.FAKECore.WiXHelperSpec
{
internal class When_creating_a_WiDir
{
private static WiXHelper.WiXDir Parameters;
private static WiXHelper.WiXDir Arguments;

Establish context = () => {
Parameters = WiXHelper.WiXDirDefaults
.With(p => p.Id, "1")
.With(p => p.Name, "Foo");
};

Because of = () => {
Func<WiXHelper.WiXDir, WiXHelper.WiXDir> f = _ => Parameters;
var fs = FuncConvert.ToFSharpFunc(new Converter<WiXHelper.WiXDir, WiXHelper.WiXDir>(f));
Arguments = WiXHelper.generateDirectory(fs);
Console.WriteLine(Arguments.ToString());
};

private It should_return_a_proper_XML_tag_on_method_call_ToString = () => Arguments.ToString()
.ShouldContain("<Directory Id=\"1\" Name=\"Foo\"></Directory");
}
}