Closed
Description
At the moment it is only possible to test values of normal properties and no way to test indexer values. I need to write a test that looks something like this:
[TestFixture]
public class TestClass
{
class Example
{
private Dictionary<string, string> dictionary = new Dictionary<string, string>();
public string this[string key]
{
get { return dictionary[key]; }
set { dictionary[key] = value; }
}
}
[Test]
public void Test()
{
var obj = new Example
{
["TEST1"] = "1",
["TEST2"] = "2",
};
Assert.That(obj, Has.Property("Item", "TEST1").EqualTo("1").And.Property("Item", "TEST2").EqualTo("2"));
}
}