public void GetSetAdjectiveOne_GetSetsAdjectiveOne_String() { MadLibs newGame = new MadLibs(); newGame.SetAdjectiveOne("run"); Assert.AreEqual("run", newGame.GetAdjectiveOne()); }
public void GetSetNounOne_GetSetsNounOne_String() { MadLibs newGame = new MadLibs(); newGame.SetNounOne("Gizmo"); Assert.AreEqual("Gizmo", newGame.GetNounOne()); }
public void GetSetOccupation_GetsSetsOccupation_String() { MadLibs newGame = new MadLibs(); newGame.SetOccupation("Farmer"); Assert.AreEqual("Farmer", newGame.GetOccupation()); }
public void Talk_NotEnoughParts_ReturnEmptyString() { var parts = new PartsOfSpeech(); string result = MadLibs.Talk(parts); Assert.That(result, Is.Empty); }
public void Talk_AnotherFullParts_ReturnStoryUsedAllParts() { var parts = new PartsOfSpeech() { Noun = "apple", Verb = "throw", Adjective = "cute", Adverb = "perfectly" }; string result = MadLibs.Talk(parts); Assert.That(result, Is.EqualTo("Do you throw your cute apple perfectly? That's hilarious!")); }
public void Talk_FullParts_ReturnStoryUsedAllParts() { var parts = new PartsOfSpeech() { Noun = "dog", Verb = "walk", Adjective = "blue", Adverb = "quickly" }; string result = MadLibs.Talk(parts); Assert.That(result, Is.EqualTo("Do you walk your blue dog quickly? That's hilarious!")); }
public ActionResult MadLibsResults() { MadLibs newGame = new MadLibs(); newGame.SetOccupation(Request.Query["occupation"]); newGame.SetNounOne(Request.Query["nounOne"]); newGame.SetNounTwo(Request.Query["nounTwo"]); newGame.SetNounThree(Request.Query["nounThree"]); newGame.SetNounFour(Request.Query["nounFour"]); newGame.SetAdjectiveOne(Request.Query["adjectiveOne"]); newGame.SetAdjectiveTwo(Request.Query["adjectiveTwo"]); newGame.SetVerbOne(Request.Query["verbOne"]); newGame.SetVerbTwo(Request.Query["verbTwo"]); newGame.SetVerbThree(Request.Query["verbThree"]); return(View(newGame)); }
public static void Main() { MadLibs greet = new MadLibs(); Console.WriteLine("Enter a noun:"); string noun = Console.ReadLine(); Console.WriteLine("Enter a verb: "); string verb = Console.ReadLine(); Console.WriteLine("Enter an adjective: "); string adj = Console.ReadLine(); Console.WriteLine("Enter an adverb: "); string adv = Console.ReadLine(); Console.WriteLine("Do you " + verb + " you " + adj + " " + noun + " " + adv + "? That's hilarious!"); }
public ActionResult MadLib(string nounOne, string nounTwo, string nounThree, string verbOne, string verbTwo, string verbThree, string adjOne, string adjTwo, string adjThree, string adverbOne, string adverbTwo, string adverbThree) { MadLibs myMadLibs = new MadLibs(); myMadLibs.NounOne = nounOne; myMadLibs.NounTwo = nounTwo; myMadLibs.NounThree = nounThree; myMadLibs.VerbOne = verbOne; myMadLibs.VerbTwo = verbTwo; myMadLibs.VerbThree = verbThree; myMadLibs.AdjOne = adjOne; myMadLibs.AdjTwo = adjTwo; myMadLibs.AdjThree = adjThree; myMadLibs.AdverbOne = adverbOne; myMadLibs.AdverbTwo = adverbTwo; myMadLibs.AdverbThree = adverbThree; return(View(myMadLibs)); }