Rank: Member
Groups: Registered
Joined: 8/20/2012(UTC) Posts: 12 Location: London
Thanks: 3 times Was thanked: 2 time(s) in 2 post(s)
|
Hello there! It looks like there's a GUI bug in NCrunch if you're using the TestCaseSource attribute and supplying test cases whose ToString() methods return multiline strings. Screenshot and sample code to reproduce is below. Thanks! Dylan Code:
public class Student {
private readonly string name;
private readonly int age;
public Student(string name, int age) {
this.name = name;
this.age = age;
}
public override string ToString() {
var sb = new StringBuilder();
sb.AppendLine("Name: " + this.name);
sb.AppendLine("Age: " + this.age);
return (sb.ToString());
}
}
[TestFixture]
public class MyTests {
public static readonly Student[] Students = {
new Student("Dylan", 35),
new Student("Steve", 26),
new Student("Laura", 34)
};
[Test]
[TestCaseSource("Students")]
public void MyTest(Student student) {
Assert.IsNotNull(student);
}
}
|