public void GivenMoodAnalyseClassName_ShouldReturnMoodAnalyseObject_UsingParameterizedConstructor() { object expected = new MoodAnalyser("HAPPY"); object obj = MoodAnalyserFactory.CreateMoodAnalyseUsingParameterizedConstructor("MoodAnalyserAppWithCore.MoodAnalyser", "MoodAnalyser", "SAD"); expected.Equals(obj); }
public void GivenMoodAnalyser_WhenAnalysed_UsingParameterizedConstructor_ShouldReturnMoodAnalyserObject() { object expected = new MoodAnalyser(); object actual = MoodAnalyserFactory.CreateObjectOfMoodAnalyserUsingParameterizedConstructor("MoodAnalyserApp.MoodAnalyser", "MoodAnalyser", "Happy"); Assert.AreEqual(expected.GetType(), actual.GetType()); }
public void GivenMoodAnalyserClassName_WhenAnalysed_ShouldReturn_MoodAnalyserObject() { object expected = new MoodAnalyser(); object actual = MoodAnalyserFactory.MoodAnalyseObjectCreation("MoodAnalyserApp.MoodAnalyser", "MoodAnalyser"); Assert.AreEqual(expected.GetType(), actual.GetType()); }
public void GivenMoodAnalyseClass_ShouldReturn_MoodAnalyserObject_UsingParameterizedConstrucor(string message) { object expected = new MoodAnalyser(message); object obj = MoodAnalyzerFactory.CreateMoodAnalyserUsingParameterisedConstructors("MoodAnalyserProblem2.MoodAnalyser", "MoodAnalyser", message); expected.Equals(obj); }
public void Given_MoodAnalyserClassName_Should_ReturnMoodAnalyserObject_usingParameterisedConstructor() { object expected = new MoodAnalyser("HAPPY"); object actual = MoodAnalyserFactory.CreateMoodAnalyserUsingParameterizedConstructor("MoodAnalyserApp.MoodAnalyser", "MoodAnalyser", "SAD"); Assert.AreEqual(expected.GetType(), actual.GetType()); }
public void AnalyseMood_WhenSadReturnSad() { MoodAnalyser moodobj = new MoodAnalyser("I am in sad mood"); string Expected = "SAD"; Assert.AreEqual(Expected, moodobj.AnalyseMood()); }
public void GivenMoodAnalyseClassName_ShouldReturnMoodAnalyseObject() { object expected = new MoodAnalyser(); object obj = MoodAnalyseFactory.CreateMoodAnalyserObject("MoodAnalyse.MoodAnalyser", "MoodAnalyser"); expected.Equals(obj); }
public void AnalyseMood_WhenHappyMoodReturnHappy() { MoodAnalyser moodobj = new MoodAnalyser("I am in happy mood"); string Expected = "HAPPY"; Assert.AreEqual(Expected, moodobj.AnalyseMood()); }
static void Main(string[] args) { MoodAnalyser mood = new MoodAnalyser("sad"); mood.analyseMoodLive1(); Console.ReadKey(); }
public void whenMood_IsSad_ShouldReturnSad() { MoodAnalyser moodAnalyser = new MoodAnalyser(); string mood = moodAnalyser.analyseMood("I am in sad Mood"); Assert.AreEqual("SAD", mood); }
public void whenMood_IsHappy_ShouldReturnHappy() { MoodAnalyser moodAnalyser = new MoodAnalyser(); string mood = moodAnalyser.analyseMood("I am in happy Mood"); Assert.AreEqual("HAPPY", mood); }
public void Given_MoodAnalyserClassName_Should_ReturnMoodAnalyserObject() { string message = null; object expected = new MoodAnalyser(message); object actual = MoodAnalyserFactory.MoodAnalyseObjectCreation("MoodAnalyserApp.MoodAnalyser", "MoodAnalyser"); Assert.AreEqual(expected.GetType(), actual.GetType()); }
public void GivenMoodAnalyseClassName_ShouldReturnMoodAnalyseObject() { string message = null; object expected = new MoodAnalyser(message); object obj = MoodAnalyserFactory.CreateMoodAnalyser("MoodAnalyserAppWithCore.MoodAnalyser", "MoodAnalyser"); expected.Equals(obj); }
public void Given_Happy_MoodAnalyser_Should_Return_Happy() { //Arrange MoodAnalyser moodAnalyse = new MoodAnalyser("I am in a Happy mood"); //Act string mood = moodAnalyse.AnalyseMood(); //Assert Assert.AreEqual("HAPPY", mood); }
public void Given_Sad_MoodAnalyser_Should_Return_Sad() { //Arrange MoodAnalyser moodAnalyse = new MoodAnalyser("I am in a Sad mood"); //Act string mood = moodAnalyse.AnalyseMood(); //Assert Assert.AreEqual("SAD", mood); }
public void GivenSadMessage_WhenAnalysed_ShouldReturnSadMood() { //Arrange MoodAnalyser analyser = new MoodAnalyser("I am in a Sad mood"); //Act string mood = analyser.AnalyseMood(); //Assert Assert.AreEqual("Sad", mood); }
public void GivenHappyMessage_WhenAnalysed_ShouldReturnHappyMood() { //Arrange MoodAnalyser analyser = new MoodAnalyser("I am in a Happy mood"); //Act string mood = analyser.AnalyseMood(); //Assert Assert.AreEqual("Happy", mood); }
public void GivenSadMessage_WhenSad_ShouldReturnSAD() { //Arrange string Expected = "SAD"; MoodAnalyser moodAnalyser = new MoodAnalyser("I am in Sad Mood"); //Act string result = moodAnalyser.AnalyseMood(); //Assert Assert.AreEqual(Expected, result); }
public void GivenNULLMessage_WhenANULL_ShouldReturnHAPPY(string message) { //Arrange string Expected = "Happy"; MoodAnalyser moodAnalyser = new MoodAnalyser(message); //Act string result = moodAnalyser.AnalyseMood(); //Assert Assert.AreEqual(Expected, result); }
public void Given_HappyMoodMessage_Should_Return_HAPPY() { ///Arrange string expected = "HAPPY"; MoodAnalyser moodAnalyser = new MoodAnalyser("i am very happy".ToUpper()); ///Act string mood = moodAnalyser.AnalyseMood(); ///Assert Assert.AreEqual(expected, mood); }
public void Given_SadMoodMessage_Should_Return_SAD() { ///Arrange string expected = "SAD"; MoodAnalyser moodAnalyser = new MoodAnalyser("i am very sad".ToUpper()); ///Act string mood = moodAnalyser.AnalyseMood(); ///Assert Assert.AreEqual(expected, mood); }
public void GivenAnyMessage_WhenAnyMood_ShouldReturnHAPPY() { //Arrange string Expected = "HAPPY"; MoodAnalyser moodAnalyser = new MoodAnalyser("I am in Any Mood"); //Act string result = moodAnalyser.AnalyseMood(); //Assert Assert.AreEqual(Expected, result); }
public void Given_MoodAnalyser_Class_Name_Should_Return_MoodAnalyser_Object_Using_Parametrized_Constructor() { //Arrange string className = "MoodAnalyse.MoodAnalyser"; string constructorName = "MoodAnalyser"; MoodAnalyser expectedObj = new MoodAnalyser("HAPPY"); //Act object resultObj = MoodAnalyseFactory.CreateMoodAnalyserUsingParameterizedConstructor(className, constructorName, "HAPPY"); //Assert expectedObj.Equals(resultObj); }
public void Given_ImproperClassName_MoodAnalyserFactoryWithParameterisedConstructor_Should_ThrowMoodAnalysisException_NO_SUCH_CLASS() { try { object expected = new MoodAnalyser(); object actual = MoodAnalyserFactory.CreateMoodAnalyserUsingParameterizedConstructor("WrongClass", "MoodAnalyser", "SAD"); } catch (MoodAnalyserCustomException e) { Assert.AreEqual("No such class found", e.Message); } }
public void GivenImproperConstructorName_WhenAnalyse_ShouldThrowMoodAnalysisException() { try { object expected = new MoodAnalyser(); object actual = MoodAnalyserFactory.MoodAnalyseObjectCreation("Mood", "MoodAnalyser"); } catch (MoodAnalyserCustomException e) { Assert.AreEqual("Constructor not found", e.Message); } }
public void GivenImproperClassName_WhenAnalyse_ShouldThrowMoodAnalysisException() { try { object expected = new MoodAnalyser(); object actual = MoodAnalyserFactory.MoodAnalyseObjectCreation("abc", "abc"); } catch (MoodAnalyserCustomException e) { Assert.AreEqual("No such class found", e.Message); } }
public void Given_ImproperConstructorName_MoodAnalyserFactoryWithParameterisedConstructor_Should_ThrowMoodAnalysisException_NO_SUCH_METHOD() { try { object expected = new MoodAnalyser(); object actual = MoodAnalyserFactory.CreateMoodAnalyserUsingParameterizedConstructor("MoodAnalyserApp.MoodAnalyser", "WrongConstructor", "HAPPY"); } catch (MoodAnalyserCustomException e) { Assert.AreEqual("No such Constructor found", e.Message); } }
public void GivenImproperConstructorName_WhenAnalyse_UsingParameterisedConstructor_ShouldThrowMoodAnalysisException() { try { object expected = new MoodAnalyser(); object actual = MoodAnalyserFactory.CreateObjectOfMoodAnalyserUsingParameterizedConstructor("MoodAnalyserApp.MoodAnalyser", "Mood", "Happy"); } catch (MoodAnalyserCustomException e) { Assert.AreEqual("Constructor not found", e.Message); } }
public void Given_ImproperClassName_Should_Throw_MoodAnalysisException_NO_SUCH_CLASS() { try { object expected = new MoodAnalyser(); object actual = MoodAnalyserFactory.MoodAnalyseObjectCreation("WrongClass", "MoodAnalyser"); } catch (MoodAnalyserCustomException e) { Assert.AreEqual("No such class found", e.Message); } }
public void Given_ImproperConstructorName_Should_Throw_MoodAnalysisException_NO_SUCH_METHOD() { try { object expected = new MoodAnalyser(); object actual = MoodAnalyserFactory.MoodAnalyseObjectCreation("WrongConstructor", "WrongConstructor"); } catch (MoodAnalyserCustomException e) { Assert.AreEqual("No such Constructor found", e.Message); } }