I suggest you ...

Make StorageClient library more unit test friendly

Currently, a developer has to jump through hoops to unit test code written against the StorageClient library. There is no official guidance for unit testing your apps, and after looking around for what others were doing I settled on creating custom interfaces and objects that wrap the library like the guys did with: http://cloudstorageapi.codeplex.com/.

How about making official interfaces for the library and providing us with an testing-oriented in-memory implementation that we can use to immediatly begin unit testing our apps without any hassle.

38 votes
Vote 0 votes Vote Vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service

    You'll receive a confirmation email with a link to create a password (optional).

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Andrew HeimdahlAndrew Heimdahl shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service

      You'll receive a confirmation email with a link to create a password (optional).

      Signed in as (Sign out)
      Submitting...
      • Steve MoirSteve Moir commented  ·   ·  Flag as inappropriate

        A good starting point would be to just have the classes implement an interface, at least that way they're more easily mockable.

      • Cory FowlerCory Fowler commented  ·   ·  Flag as inappropriate

        I'm on board with the need for Unit Testing. I would like to see some interfaces to make Helper/Service classes that leverage the power of generics to keep my code to a minimum.

        Something like so:

        private void InitializeStorage<ICreateStorageEndpoint>(T storageService, ref bool initializeFlag, ref object lockKey)
        {
        lock(lockKey)
        {
        if (initializeFlag) return;
        initializeFlag = storageService.CreateIfNotExists();
        }
        }

      Knowledge Base and Helpdesk