locked
How to write shims code in a realtime unit test ? RRS feed

  • Question

  •  public static void DeleteData(string SessionID)
            {
                LLC_Home.DeleteData(SessionID);
            }
    Thursday, March 28, 2013 12:17 PM

Answers

  • As we know, shims are used in unit test, I don't think the realtime test data should be applied in this scenario. Instead, should use fixed test data, in which case the test is isolated as much as possible from other dependencies. Does that sound make sense?

    If you are testing web application, involves session in test, you can record a web test. Visual Studio can parameterize the test automatically.

    Reference: http://msdn.microsoft.com/en-us/library/hh549175.aspx

    Forrest Guo | MSDN Community Support | Feedback to manager


    • Edited by Forrest Guo Friday, March 29, 2013 1:35 PM
    • Marked as answer by Devsoft1 Friday, March 29, 2013 2:11 PM
    Friday, March 29, 2013 1:33 PM

All replies

  • Hi,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 29, 2013 6:28 AM
  • As we know, shims are used in unit test, I don't think the realtime test data should be applied in this scenario. Instead, should use fixed test data, in which case the test is isolated as much as possible from other dependencies. Does that sound make sense?

    If you are testing web application, involves session in test, you can record a web test. Visual Studio can parameterize the test automatically.

    Reference: http://msdn.microsoft.com/en-us/library/hh549175.aspx

    Forrest Guo | MSDN Community Support | Feedback to manager


    • Edited by Forrest Guo Friday, March 29, 2013 1:35 PM
    • Marked as answer by Devsoft1 Friday, March 29, 2013 2:11 PM
    Friday, March 29, 2013 1:33 PM