sergeyshushlyapin/Sitecore.FakeDb — pull request #3 by pveller (2014-03-26 22:10:30+00:00)
Title: Add support for template standard values and base templates. Make templa...

...tes appear as sitecore items (as they are in Sitecore). My main goal was to work with the layout fields under test and for it to work properly we need **templates with standard values** and we need **templates to become items** and also add support for some standard fields. I created a separate `StandardFields` property to separate if from the settable `Fields` (it will come handy later so I feel it's the best way anyway). The next thing I did - the `DbTemplate` now extends from `DbItem` and it goes through the same cycle the item goes through when added to the `Db`. Most importantly - adding a `DbTemplate` to a database also adds it as an item. As a *side effect* of templates becoming items they no longer have their `ID` settable and neither is it allowed to have a template with a null name. Which is again the right way to have it I believe.

The items go into `/sitecore/content` and templates go into `/sitecore/templates` by default. I also had to rewrite a bit the logic of `Db.ResolveTemplate()` due to all the changes I mentioned.

All tests pass and I added some more of course. I also added a section in the doc about creating templates with standard values.