Можно попробовать что-то как:
InputStream stream = this.getClass().getClassLoader().getResourceAsStream("/images/image.jpg");
В Вашем файле JAR, у Вас могла бы быть структура каталогов:
MyJAR.jar
- com (файлы класса в здесь)
- изображения
----image.jpg
Be careful. NaN is weird, somewhat like null in many DBMSs, and you shouldn't be comparing values to it (either directly, or with Assert.AreEqual). From the docs for Double.NaN:
Use IsNaN to determine whether a value is not a number. It is not possible to determine whether a value is not a number by comparing it to another value equal to NaN.
double zero = 0;
Console.WriteLine((0 / zero) == Double.NaN); // prints false
Console.WriteLine(Double.IsNaN(0 / zero)); // prints true
You'd have to peer at the internals of Assert(double, double, double) to see what's going on, but in general, you're depending on undefined behavior relative to NaN.