public void OutputAssemblyWithSpaces() { var t = new ResolveComReference.TlbImp(); string testParameterValue = @"c:\Program Files\AxInterop.Foo.dll"; Assert.Null(t.OutputAssembly); // "OutputAssembly should be null by default" CommandLine.ValidateNoParameterStartsWith( t, @"/out:", false /* no response file */); t.OutputAssembly = testParameterValue; Assert.Equal(testParameterValue, t.OutputAssembly); // "New OutputAssembly value should be set" CommandLine.ValidateHasParameter( t, @"/out:" + testParameterValue, false /* no response file */); }
public void AssemblyVersion() { var t = new ResolveComReference.TlbImp(); Version testParameterValue = new Version(2, 12); Assert.Null(t.AssemblyVersion); // "AssemblyVersion should be null by default" CommandLine.ValidateNoParameterStartsWith( t, @"/asmversion:", false /* no response file */); t.AssemblyVersion = testParameterValue; Assert.Equal(testParameterValue, t.AssemblyVersion); // "New AssemblyNamespace value should be set" CommandLine.ValidateHasParameter( t, @"/asmversion:" + testParameterValue.ToString(), false /* no response file */); }
public void AssemblyNamespace() { var t = new ResolveComReference.TlbImp(); string testParameterValue = "Microsoft.Build.Foo"; Assert.Null(t.AssemblyNamespace); // "AssemblyNamespace should be null by default" CommandLine.ValidateNoParameterStartsWith( t, @"/namespace:", false /* no response file */); t.AssemblyNamespace = testParameterValue; Assert.Equal(testParameterValue, t.AssemblyNamespace); // "New AssemblyNamespace value should be set" CommandLine.ValidateHasParameter( t, @"/namespace:" + testParameterValue, false /* no response file */); }
public void Verbose() { var t = new ResolveComReference.TlbImp(); Assert.False(t.Verbose); // "Verbose should be false by default" CommandLine.ValidateNoParameterStartsWith( t, @"/verbose", false /* no response file */); t.Verbose = true; Assert.True(t.Verbose); // "Verbose should be true" CommandLine.ValidateHasParameter( t, @"/verbose", false /* no response file */); }
public void KeyFileWithSpaces() { AxTlbBaseTask t = new ResolveComReference.TlbImp(); string testParameterValue = @"C:\Program Files\myKeyFile.key"; Assert.Null(t.KeyFile); // "KeyFile should be null by default" CommandLine.ValidateNoParameterStartsWith( t, @"/keyfile:", false /* no response file */); t.KeyFile = testParameterValue; Assert.Equal(testParameterValue, t.KeyFile); // "New KeyFile value should be set" CommandLine.ValidateHasParameter( t, @"/keyfile:" + testParameterValue, false /* no response file */); }
public void TaskFailsWithNoInputs() { var t = new ResolveComReference.TlbImp(); Utilities.ExecuteTaskAndVerifyLogContainsErrorFromResource(t, "TlbImp.NoInputFileSpecified"); }