public void Given_MoodAnalyser_ClassName_ShouldReturn_MoodAnalyseObject() { object expected = new MoodAnalyser("NULL"); object obj = MoodAnalyserFactory.CreateMoodAnalyseMethod("MoodAnalyzer.MoodAnalyser", "MoodAnalyser"); expected.Equals(obj); }
public void GivenInvalidClassName_ShouldThrow_MoodAnalyserException() { string expected = "Class not Found"; try { object obj = MoodAnalyserFactory.CreateMoodAnalyseMethod("MoodAnalyser.sampleClass", "MoodAnalyser"); } catch (MoodAnalyzerCustomException e) { Assert.AreEqual(expected, e.Message); } }
public void GivenClass_WhenNotProper_Constructor_ShouldThrow_MoodAnalyserException() { string expected = "Constructor is not Found"; try { object obj = MoodAnalyserFactory.CreateMoodAnalyseMethod("MoodAnalyzer.MoodAnalyser", "sampleClass"); } catch (MoodAnalyzerCustomException e) { Assert.AreEqual(expected, e.Message); } }
public void Given_MoodAnalyser__Using_Reflection_ToReturn_defaultConstructor() { string expected = "Constructor is not Found"; try { object obj = MoodAnalyserFactory.CreateMoodAnalyseMethod("MoodAnalyserProblem.MoodAnalyser", "MoodAnalyser"); } catch (MoodAnalyserException ex) { Assert.AreEqual(expected, ex.Message); } }