Should I use inherited tests?
问题 I am reviewing some code where the developer has some classes ClassA and ClassB. They both inherit from ParentClass so both must implement a number of abstract methods (e.g. return5Values(2) ) In ClassA the values are all double the previous value: [2,4,8,16,32] In ClassB the values are all +1 the previous value [2,3,4,5,6] There are also other constraints such as raising an error if the parameter is negative etc. Other tests like getting the 3rd value only, also exist etc. (Obviously these