public void InterceptorCanCoerceResultingCollection() { var data = new object[] { "5", "18", "2" }; var adjusted = EventsInterceptor.Adjust(data, typeof(IEnumerable <string>)); Assert.That(data, Is.InstanceOf <IEnumerable <object> >()); Assert.That(data, Is.Not.InstanceOf <IEnumerable <string> >()); Assert.That(adjusted, Is.InstanceOf <IEnumerable <string> >()); }
public void InterceptorCanCoerceResultingCollection() { var data = new object[] { "5", "18", "2" }; var adjusted = EventsInterceptor.Adjust(data, typeof(IEnumerable <string>)); Assert.NotNull(data as IEnumerable <object>); Assert.Null(data as IEnumerable <string>); Assert.NotNull(adjusted as IEnumerable <string>); }