Contents tagged with NUnit

  • How to unit test web api controller with Uploader

    Hello everybody,

    today I want to share piece of code of how to unit test web API2 controller. 

    So, recently I had the following task, make web api controller, which accepts posted files, and does something with them. But because at that project I was in role of back end developer ( not full-stack ), it wasn't possible for me to write client side javascript for posting files. What is common way to behave for server side developers? If you proposed to write unit test which will imitate creating and uploading file you are 100% correct. That was my decision as well. 

    I don't know how about you, but if it is needed to work with uploaded files, I used to work with HttpContext.Current.Request. … more

  • Unit test abbreviations

    Hello everybody,

    some abbreaviations:

    SUT - system under test. AKA as AUT, MUT, CUT.

    DUT - device under test

    DOC - depend on component more