public void ExternalBuildStepConstructorTest2() { int number = 0; string commandLine = "test"; ExternalBuildStep target = new ExternalBuildStep(null, number, commandLine); Assert.AreEqual(0, target.StepNumber); Assert.AreEqual("test", target.InputFile); Assert.AreEqual(String.Empty, target.Arguments); }
public void ArgumentsTest() { int stepNumber = 0; string commandLine = "test arg1 arg2 arg3"; ExternalBuildStep target = new ExternalBuildStep(null, stepNumber, commandLine); string expected = "arg1 arg2 arg3"; string actual = target.Arguments; Assert.AreEqual(expected, actual); }
public void ExternalBuildStepConstructorTest() { int number = 0; string program = "test"; string arguments = "arg"; ExternalBuildStep target = new ExternalBuildStep(null, number, program, arguments); Assert.AreEqual(0, target.StepNumber); Assert.AreEqual(program, target.InputFile); Assert.AreEqual(arguments, target.Arguments); }
public void DescriptionTest() { int number = 0; string commandLine = "test args"; ExternalBuildStep target = new ExternalBuildStep(null, number, commandLine); string expected = "Run test"; string actual = target.Description; Assert.AreEqual(expected, actual); }
public void CloneTest() { int number = 0; string commandLine = "test args"; ExternalBuildStep target = new ExternalBuildStep(null, number, commandLine); IBuildStep expected = target; IBuildStep actual = (IBuildStep)target.Clone(); Assert.AreEqual(expected, actual); }
public void ExternalBuildStep_GetHashCode() { int number = 0; string program = "test"; string arguments = "arg"; ExternalBuildStep target = new ExternalBuildStep(null, number, program, arguments); ExternalBuildStep target2 = new ExternalBuildStep(null, number, program, arguments); bool actual = target.GetHashCode() == target2.GetHashCode(); Assert.AreEqual(true, actual); }
public void ExternalBuildStep_Equals_NotEqual2() { int number = 0; string program = "test"; string arguments = "arg"; ExternalBuildStep target = new ExternalBuildStep(null, number, program, arguments); ExternalBuildStep target2 = new ExternalBuildStep(null, number + 1, program + "1", arguments + "1"); bool actual = target.Equals(target2); Assert.AreEqual(false, actual); }
public void StepNumberTest() { int number = int.MaxValue; string commandLine = "test args"; ExternalBuildStep target = new ExternalBuildStep(null, number, commandLine); int expected = number; target.StepNumber = expected; int actual = target.StepNumber; Assert.AreEqual(expected, actual); }
public void InputFileTest() { int number = 0; string commandLine = @"C:\Users\Test\test args"; ExternalBuildStep target = new ExternalBuildStep(null, number, commandLine); FilePath expected = new FilePath(@"C:\Users\Test\test"); target.InputFile = expected; FilePath actual = target.InputFile; Assert.AreEqual(expected, actual); }
public void CallbackTest() { int number = 0; string commandLine = "test args"; ExternalBuildStep target = new ExternalBuildStep(null, number, commandLine); bool pass = false; Action <string> expected = new Action <string>((string test) => pass = true); target.Callback = expected; target.Callback("output"); Assert.AreEqual(true, pass); }
public void ProjectTest() { string projectFile = @"C:\Users\Test\file.wcodeproj"; string projectName = "Project"; IProject project = new Project(projectFile, projectName); int stepNumber = 0; string commandLine = "test arg"; ExternalBuildStep target = new ExternalBuildStep(project, stepNumber, commandLine); IProject expected = project; IProject actual = target.Project; Assert.AreEqual(expected, actual); }
private void stepTypeBox_SelectedIndexChanged(object sender, EventArgs e) { IBuildStep step = null; _currentConfig.RemoveStep((IBuildStep)buildSeqList.SelectedItem); int stepNum = ((IBuildStep)buildSeqList.SelectedItem).StepNumber; if (buildSeqList.SelectedItem is InternalBuildStep && stepTypeBox.SelectedIndex != 0) { step = new ExternalBuildStep(buildSeqList.SelectedIndex, new FilePath("cmd.exe"), string.Empty) { StepNumber = stepNum }; } else if (buildSeqList.SelectedItem is ExternalBuildStep && stepTypeBox.SelectedIndex != 1) { step = new InternalBuildStep( buildSeqList.SelectedIndex, BuildStepType.Assemble, _project.ProjectFile.ChangeExtension(".asm"), _project.ProjectFile.ChangeExtension(".8xk")) { StepNumber = stepNum }; } if (step == null) { return; } _currentConfig.AddStep(step); buildSeqList.Items[buildSeqList.SelectedIndex] = step; UpdateStepOptions(); _needsSave = true; }