public void ComputeTranspilationOutputDirectory(string rootNamespace, Type orchestrationType, string outputDirectory) { var sut = new TranspilationTaskSpy(@"C:\Project\GeneratedOrchestrationBindings", "OrchestrationBinding.Designer.cs") { RootNamespace = rootNamespace, RootPath = @"C:\Project" }; sut.CreateOutputTaskItem(orchestrationType) .Should().BeEquivalentTo(new TaskItem(outputDirectory)); }
public void TranspileThrowsWhenAddingDuplicateOutputTaskItem() { var sut = new TranspilationTaskSpy( @"C:\Project", ".Designer.cs", new[] { typeof(Orchestrations.Bound.Process), typeof(Orchestrations.Bound.Process) }) { RootNamespace = @"Be.Stateless.BizTalk", RootPath = @"C:\Project", BuildEngine = new Mock <IBuildEngine>().Object }; Invoking(() => sut.Transpile()) .Should().Throw <InvalidOperationException>() .WithMessage(@"'C:\Project\Orchestrations\Bound\Process.Designer.cs' output task item has been defined multiple times."); }