Well, you could do that with reflection, the link that @Pavel Anikhouski gave you might help you, but I consider using reflection is always a hacky thing. Sometimes you can't avoid it sure, but you should avoid it if you can.
On the other hand unit testing is not for testing the design of your code/application (that you want to achieve now), rather the testing of it's functionality.
"Check that your code is working as expected by creating and running unit tests. It's called unit testing because you break down the functionality of your program into discrete testable behaviors that you can test as individual units."
https://learn.microsoft.com/en-us/visualstudio/test/unit-test-basics?view=vs-2019
Having a property or attribute in a class is not functionality nor behaviour.
To be honest, I don't see any use cases where and when you want to achieve something like this. If you want to test that a class has a property why write lines of code to just check that one specific property? Just open the class code and see if it has that property or not, if it doesn't have it then write it in the code.