public void TestNotAllowsToAnalyzeInhritentFrom() { //Given AnalyzerImpl analyzer = new AnalyzerImpl(); analyzer.LastResponse = new Object(); MockStringAnalyzerParameter parameter = new MockStringAnalyzerParameter(); //When analyzer.Analyze(parameter); //Then Assert.AreEqual(false, parameter.Status); }
public void TestAllowsToAnalyzeInhritentFrom() { //Given AnalyzerImpl analyzer = new AnalyzerImpl(); analyzer.LastResponse = new String(new char[] {}); MockObjectAnalyzerParameter parameter = new MockObjectAnalyzerParameter(); //When analyzer.Analyze(parameter); //Then Assert.AreEqual(true, parameter.Status); }
public void TestSuccessfulSimpleAnalyzing() { //Given AnalyzerImpl analyzer = new AnalyzerImpl(); analyzer.LastResponse = "This is some test text"; FindText parameter = new FindText("some"); //When analyzer.Analyze(parameter); //Then Assert.AreEqual(true,parameter.Status); Assert.AreEqual(FindText.SuccessMessage, parameter.Title); }
public void TestFailureInSimpleAnalyzing() { //Given AnalyzerImpl analyzer = new AnalyzerImpl(); analyzer.LastResponse = "This is some test text"; FindText parameter = new FindText("other text"); //When analyzer.Analyze(parameter); //Then Assert.AreEqual(false, parameter.Status); Assert.AreEqual(FindText.FailureMessage, parameter.Title); }