public void ReturnNull() { var meti = new MultiEntityTypeInspector(new[] { new EntityTypeInspectorStub(null), new EntityTypeInspectorStub(null) }); Assert.That(meti.GuessType(5), Is.Null); }
public void ReturnFirstValid() { var expected = typeof(MultiEntityTypeInspectorFixture); var meti = new MultiEntityTypeInspector(new[] { new EntityTypeInspectorStub(expected), new EntityTypeInspectorStub(typeof(object)) }); Assert.That(meti.GuessType(5), Is.EqualTo(expected)); expected = typeof(object); meti = new MultiEntityTypeInspector(new[] { new EntityTypeInspectorStub(null), new EntityTypeInspectorStub(typeof(object)) }); Assert.That(meti.GuessType(5), Is.EqualTo(expected)); }