static void Main(string[] args) { DeepThought dt = new DeepThought(); dt.AnswerToTheUltimateQuestionOfLifeTheUniverseAndEverything(); Console.WriteLine("Hello World!"); }
public void TheAnswerToTheUltimateQuestionOfLifeTheUniverseAndEverythingTest() { int expected = 42; var dt = new DeepThought(); int actual = dt.TheAnswerToTheUltimateQuestionOfLifeTheUniverseAndEverything(); Assert.AreEqual(expected, actual); }
public void TestTheAnswerOfTheUniverse() { int expected = 42; DeepThought dt = new DeepThought(); int actual = dt.TheAnswerOfTheUniverse(); Assert.Equal(expected, actual); }
public void TheAnswerOfTheUltimateQuestionOfLifeTheUniverseAndEverythingTest() { int expected = 42; var dt = new DeepThought(); int actual = dt.TheAnswerToTheUltimateQuestionOfLifeTheUniverseAndEverything(); Assert.Equal(expected, actual); }
public void SetUp() { _deepThought = new DeepThought(new QuestionConfigurationSetting { Value = _theQuestion }, new AnswerConfigurationSetting { Value = _theAnswer }); }
public void TheAnswerOfTheUltimateQuestionOfLifeTheUniverseAndEverythingTest() { //arrange int expected = 42; var dt = new DeepThought(); //act int actual = dt.TheAnswerOfTheUltimateQuestionOfLifeTheUniverseAndEverything(); //assert Assert.AreEqual(expected, actual); }
//Removes deep thought of trigger type when you exit a trigger public void RemoveDeepThoughtTrigger(DeepThought _deepThought) { if (DeepThoughtList.Count > 0) { for (indexOfList = 0; indexOfList < DeepThoughtList.Count; indexOfList++) { if (DeepThoughtList[indexOfList].TypeOfDeepThought == TypeOfDT.Trigger) { if (DeepThoughtList[indexOfList].Text == _deepThought.Text) { DeepThoughtList.RemoveAt(indexOfList); } } } } }
private void bCreate_Click(object sender, EventArgs e) { if (tbBloxDir.Text == "" || !Directory.Exists(tbBloxDir.Text)) { MessageBox.Show("Can't find specified TradingBlox Directory.", "Missing Information", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (!Directory.Exists(tbOutputDir.Text)) { MessageBox.Show("Can't find Output Directory. Please enter a valid directory", "Missing Information", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } List<string> systems = new List<string>(); GuiSettings settings = new GuiSettings(); if (tbBloxDir.Text[tbBloxDir.Text.Length - 1] != '\\') settings.BloxDir = tbBloxDir.Text + '\\'; else settings.BloxDir = tbBloxDir.Text; if (tbOutputDir.Text[tbOutputDir.Text.Length - 1] != '\\') settings.OutputDir = tbOutputDir.Text + '\\'; else settings.OutputDir = tbOutputDir.Text; foreach (CheckBox cb in systemCheckBoxes) { if (cb.Checked == true) systems.Add(cb.Text + ".tbs"); } if (systems.Count == 0) { MessageBox.Show("No System was selected!", "Missing Information", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } settings.Systems = systems.ToArray(); DeepThought deep = new DeepThought(settings); deep.statChanged += new statusChanged(updateProgress); pProgress.Visible = true; bCreate.Enabled = false; deep.readSystems(); }
public void Can_get_answer() { var actual = DeepThought.GetAnswer(); Assert.Equal(42, actual); }
public void SetUp() { _deepThought = new DeepThought(new QuestionConfigurationSetting { Value = _theQuestion }, new AnswerConfigurationSetting { Value = _theAnswer }); }