Traditionally, you test methods -- stuff that does actual "work".  If
you have a property getter/setter that does a lot of work (which you
shouldn't) you could write tests for it.

What you'd use Rhino.Mocks for is testing something that requires an
IContext.  With Rhino.Mocks, you can create a stub IContext and set up
the properties to return specific pieces of data.  You then use that
stub in your unit test to make sure the component that uses the
IContext does its work properly.

---
Patrick Steele
http://weblogs.asp.net/psteele



On Thu, Oct 13, 2011 at 4:22 PM, Laksh <[email protected]> wrote:
> How & what to test in class properties using Rhino Mocks. I have the
> following Interface but im not sure how & what to test in this
> IContext ? can someone help me
>
>
> public interface IContext
>    {
>        int BatchID { get; set; }
>
>        Document[] InputDocuments { get; set; }
>
>        Document[] ConvertedDocuments { get; set; }
>
>        Document PackagedDocument { get; set; }
>    }
>
>  public class Document
>    {
>        public Stream DocumentStream { get; set; }
>        public DocumentType UserDocumentType { get; set; }
>    }
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Rhino.Mocks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rhinomocks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rhinomocks?hl=en.

Reply via email to