public class When_a_task_has_complex_arguments : ContextSpecification
{
TaskCollection _tasks;
public override void EstablishContext()
{
_tasks = new TaskCollection(
new StubPluginDiscoverer( @"email" ).DiscoveredPlugins,
new List<string>
{
@"-email:from:steve@dunnhq.com+to:joe@bloggs.com+subject:""Emailing {{FileName}}""+body:""This is the body""+otherAttachments:""c:\temp\disclaimer.txt;c:\temp\copyright.txt"""
}
);
}
public override void Because()
{
}
[Fact]
public void it_should_store_the_moniker()
{
ITask task = _tasks.First( );
Assert.Equal( @"email", task.Moniker );
}
[Fact]
public void it_should_store_the_whole_settings_value()
{
ITask task = _tasks.First( );
Assert.Equal(
@"from:steve@dunnhq.com+to:joe@bloggs.com+subject:""Emailing {{FileName}}""+body:""This is the body""+otherAttachments:""c:\temp\disclaimer.txt;c:\temp\copyright.txt""",