Added more resource tests and some explicit checking for types and ranges to the resource constructor to make some tests green.