how can protected members of base class be accessed during unit test?
        Posted  
        
            by 
                amateur
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by amateur
        
        
        
        Published on 2011-11-28T09:38:40Z
        Indexed on 
            2011/11/28
            9:52 UTC
        
        
        Read the original article
        Hit count: 215
        
I am creating a unit test in mstest with rhino mocks. I have a class A that inherits class B. I am testing class A and create an instance of it for my test. The class it inherits, "B", has some protected methods and protected properties that I would like to access for the benefit of my tests. For example, validate that a protected property on my base class has the expected value.
Any ideas how I might access these protected properties of class B during my test?
© Stack Overflow or respective owner