title: How to create an in-memory icon for my unit test
body: <p>I have a resource assembly that contains various strings, icons, and bitmaps that my application uses.</p>
  
  <p>I have written a Resource Manager class that I would like to unit test.  I have managed to create unit tests that have in-memory strings (duh) and bitmaps but I am struggling with how to handle the icon resources.</p>
  
  <p>Bitmaps can be easily created with just a height and width params but Icons seem to require a valid stream.</p>
  
  <p>I've tried:</p>
  
  <pre><code>Icon icon = new Icon(new MemoryStream(), new Size(10, 15));
  </code></pre>
  
  <p>But this gives me the error "Argument 'picture' must be a picture that can be used as an icon".</p>
  
  <p>Obviously I'm trying to write unit tests so want to avoid having to load a real icon from the file system.  Also the ResourceManager class is dealing with embedded resources within an assembly so I don't want to embed a real icon within my unit test assembly otherwise I'll be using similar code to facilitate the test which seems counter intuitive.</p>
  
  <p>Any ideas?</p>
  
  <p>Cheers,
  Ben</p>