Standard.Licensing icon indicating copy to clipboard operation
Standard.Licensing copied to clipboard

AssertThat throws error if Attribute or Feature deos not exist

Open MikeWilliams-UK opened this issue 1 year ago • 0 comments

In a .Net Framework (4.6.2) application.

If you have a licence which has been generated with an attribue of "Random1" and when you validate it you try to get an attribute of "Random2" you get a System.NullReferenceException when using .AssertThat(lic => lic.AdditionalAttributes.Get("Random2")

Same happens if you specify a feature which does not exist in the licence.

I would expect both of these to gracefully fail validation with a message similar to "Attribute 'Random2' not present in the licence."

MikeWilliams-UK avatar Apr 17 '23 10:04 MikeWilliams-UK