locked
MOQ Test for HardCoded Values RRS feed

  • Question

  • I have a method which takes in a request object. The request object has a enum property.

    Before the passed in request object is sent to the actual service, we change the enum value. i.e.

    Passed enum value may be NULL or Enum Value1. Before the service call is done, the enum value is updated or hard coded i.e. 
    Enum Property = Enum Value 2.

    I need to write a test to check whether the passed in enum value is Enum Value 2 and nothing else.

    • Moved by John Qiao Tuesday, May 19, 2015 10:24 AM
    Thursday, May 14, 2015 9:42 PM

Answers

  • Hi Sameer,

    Thanks for your post.

    For this MOQ test issue, you can consider posting it at the following more appropriate place for more efficient responses. Thanks!

    Quick start with Moq
    http://code.google.com/p/moq/wiki/QuickStart

    The place for discussing Moq issues
    http://code.google.com/p/moq/issues/list


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Just Karl Friday, May 22, 2015 7:44 PM
    • Marked as answer by Just Karl Friday, May 29, 2015 3:55 PM
    Friday, May 15, 2015 6:06 AM

All replies

  • Hi Sameer,

    Thanks for your post.

    For this MOQ test issue, you can consider posting it at the following more appropriate place for more efficient responses. Thanks!

    Quick start with Moq
    http://code.google.com/p/moq/wiki/QuickStart

    The place for discussing Moq issues
    http://code.google.com/p/moq/issues/list


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Just Karl Friday, May 22, 2015 7:44 PM
    • Marked as answer by Just Karl Friday, May 29, 2015 3:55 PM
    Friday, May 15, 2015 6:06 AM
  • Hi Sameer, 

    Have you confirmed that? 

    If there’s anything misunderstood, please describe your question in more detail and we will try to provide the better responses.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 18, 2015 10:15 AM
  • I have posted it. But still awaiting for any replies.
    Friday, May 22, 2015 5:58 PM