Standard.Licensing
Standard.Licensing copied to clipboard
AssertThat throws error if Attribute or Feature deos not exist
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."