Skip to content
Browse files

Import solution with simple Rakefile.

  • Loading branch information...
1 parent 512b01e commit 18b22d2d2228948883f485b65c358acd0417670d @nfisher nfisher committed Aug 24, 2011
Showing with 22,120 additions and 0 deletions.
  1. +57 −0 LICENSE.txt
  2. +15 −0 NOTICE.txt
  3. +7 −0 README.txt
  4. +57 −0 Rakefile
  5. +44 −0 Restbucks.ProductCatalog.sln
  6. +411 −0 TestResult.xml
  7. +2 −0 go.bat
  8. +56 −0 go.build
  9. BIN lib/Castle.Core.dll
  10. BIN lib/Castle.DynamicProxy2.dll
  11. BIN lib/Castle.MicroKernel.dll
  12. BIN lib/Castle.Windsor.dll
  13. BIN lib/Restbucks.Xml.dll
  14. BIN lib/log4net.dll
  15. +2 −0 run.bat
  16. +43 −0 src/ProductCatalog.Host/App.config
  17. +12 −0 src/ProductCatalog.Host/Model/Product.cs
  18. +11 −0 src/ProductCatalog.Host/Model/ProductReference.cs
  19. +10 −0 src/ProductCatalog.Host/Model/Promotion.cs
  20. +11 −0 src/ProductCatalog.Host/Model/RegionReference.cs
  21. +107 −0 src/ProductCatalog.Host/ProductCatalog.Host.csproj
  22. +71 −0 src/ProductCatalog.Host/Program.cs
  23. +36 −0 src/ProductCatalog.Host/Properties/AssemblyInfo.cs
  24. +85 −0 src/ProductCatalog.Host/Setup/Container.cs
  25. +37 −0 src/ProductCatalog.Host/bin/Debug/logs/Restbucks.ProductCatalog.log
  26. +20 −0 src/ProductCatalog.Notifications/Http/CacheControl.cs
  27. +19 −0 src/ProductCatalog.Notifications/Http/ContentType.cs
  28. +37 −0 src/ProductCatalog.Notifications/Http/ETag.cs
  29. +21 −0 src/ProductCatalog.Notifications/Http/HeaderQuery.cs
  30. +7 −0 src/ProductCatalog.Notifications/Http/IChunkingStrategy.cs
  31. +9 −0 src/ProductCatalog.Notifications/Http/ICondition.cs
  32. +7 −0 src/ProductCatalog.Notifications/Http/IHeader.cs
  33. +10 −0 src/ProductCatalog.Notifications/Http/IRequestWrapper.cs
  34. +7 −0 src/ProductCatalog.Notifications/Http/IResponse.cs
  35. +14 −0 src/ProductCatalog.Notifications/Http/IResponseContext.cs
  36. +18 −0 src/ProductCatalog.Notifications/Http/IResponseWrapper.cs
  37. +32 −0 src/ProductCatalog.Notifications/Http/IfNoneMatch.cs
  38. +19 −0 src/ProductCatalog.Notifications/Http/LastModified.cs
  39. +18 −0 src/ProductCatalog.Notifications/Http/NullCondition.cs
  40. +54 −0 src/ProductCatalog.Notifications/Http/Response.cs
  41. +66 −0 src/ProductCatalog.Notifications/Http/ResponseContext.cs
  42. +50 −0 src/ProductCatalog.Notifications/Http/SendChunked.cs
  43. +30 −0 src/ProductCatalog.Notifications/Http/StatusCode.cs
  44. +21 −0 src/ProductCatalog.Notifications/Model/ArchiveFeed.cs
  45. +30 −0 src/ProductCatalog.Notifications/Model/CopyEntityBody.cs
  46. +34 −0 src/ProductCatalog.Notifications/Model/FeedMappings.cs
  47. +21 −0 src/ProductCatalog.Notifications/Model/FeedOfRecentEvents.cs
  48. +19 −0 src/ProductCatalog.Notifications/Model/GetFeedCommand.cs
  49. +18 −0 src/ProductCatalog.Notifications/Model/GetFeedOfRecentEventsCommand.cs
  50. +30 −0 src/ProductCatalog.Notifications/Model/HeadersOnlyRepresentation.cs
  51. +10 −0 src/ProductCatalog.Notifications/Model/IAcceptResourceIdParameters.cs
  52. +9 −0 src/ProductCatalog.Notifications/Model/IEntityBodyTransformationStrategy.cs
  53. +11 −0 src/ProductCatalog.Notifications/Model/IFeedMappings.cs
  54. +8 −0 src/ProductCatalog.Notifications/Model/IRepository.cs
  55. +9 −0 src/ProductCatalog.Notifications/Model/IRepresentation.cs
  56. +23 −0 src/ProductCatalog.Notifications/Model/NullRepresentation.cs
  57. +48 −0 src/ProductCatalog.Notifications/Model/Repository.cs
  58. +54 −0 src/ProductCatalog.Notifications/Model/ResourceId.cs
  59. +19 −0 src/ProductCatalog.Notifications/Model/ResourceIdParameters.cs
  60. +32 −0 src/ProductCatalog.Notifications/Model/ResourceIdToStoreIdConverter.cs
  61. +57 −0 src/ProductCatalog.Notifications/Model/RewriteEntityBody.cs
  62. +21 −0 src/ProductCatalog.Notifications/Model/WorkingFeed.cs
  63. +41 −0 src/ProductCatalog.Notifications/Net/HttpListenerRequestWrapper.cs
  64. +66 −0 src/ProductCatalog.Notifications/Net/HttpListenerResponseWrapper.cs
  65. +62 −0 src/ProductCatalog.Notifications/NotificationsService.cs
  66. +34 −0 src/ProductCatalog.Notifications/Persistence/FileBasedAtomDocument.cs
  67. +31 −0 src/ProductCatalog.Notifications/Persistence/FileStore.cs
  68. +10 −0 src/ProductCatalog.Notifications/Persistence/IStore.cs
  69. +11 −0 src/ProductCatalog.Notifications/Persistence/IStoreId.cs
  70. +24 −0 src/ProductCatalog.Notifications/Persistence/NotFoundException.cs
  71. +37 −0 src/ProductCatalog.Notifications/Persistence/StoreId.cs
  72. +132 −0 src/ProductCatalog.Notifications/ProductCatalog.Notifications.csproj
  73. +36 −0 src/ProductCatalog.Notifications/Properties/AssemblyInfo.cs
  74. +9 −0 src/ProductCatalog.Notifications/Service/IRepositoryCommand.cs
  75. +24 −0 src/ProductCatalog.Notifications/Service/InvalidUriException.cs
  76. +25 −0 src/ProductCatalog.Notifications/Service/NullFeedMappings.cs
  77. +49 −0 src/ProductCatalog.Notifications/Service/Routes.cs
  78. +24 −0 src/ProductCatalog.Notifications/Service/ServerException.cs
  79. +76 −0 src/ProductCatalog.Notifications/Service/ServiceHost.cs
  80. +23 −0 src/ProductCatalog.Shared/Check.cs
  81. +26 −0 src/ProductCatalog.Shared/FeedMappingsChangedEventArgs.cs
  82. +59 −0 src/ProductCatalog.Shared/FileSystemConfiguration.cs
  83. +71 −0 src/ProductCatalog.Shared/ProductCatalog.Shared.csproj
  84. +36 −0 src/ProductCatalog.Shared/Properties/AssemblyInfo.cs
  85. +28 −0 src/ProductCatalog.Shared/SyndicationFeedExtensions.cs
  86. +18 −0 src/ProductCatalog.Shared/SyndicationItemExtensions.cs
  87. +40 −0 src/ProductCatalog.Shared/UriConfiguration.cs
  88. +22 −0 src/ProductCatalog.Tests/Data/first-temp-feed/4ad58931-cdd5-4368-95fb-43a5328d0e30.atom
  89. +1 −0 src/ProductCatalog.Tests/Data/non-atom-files/non-atom-content.txt
  90. +15 −0 src/ProductCatalog.Tests/Data/notification/entry.atom
  91. +23 −0 src/ProductCatalog.Tests/Data/productcatalog/archive/archive.atom
  92. +53 −0 src/ProductCatalog.Tests/Data/productcatalog/current.atom
  93. +53 −0 src/ProductCatalog.Tests/Data/temp-feeds/0eace07e-e698-4d98-8f8e-37d361cf973a.atom
  94. +53 −0 src/ProductCatalog.Tests/Data/temp-feeds/1b3d1bd9-9922-46af-8aab-01933502d1ee.atom
  95. +53 −0 src/ProductCatalog.Tests/Data/temp-feeds/341d5f60-7667-4946-9291-765b85229c0a.atom
  96. +52 −0 src/ProductCatalog.Tests/Data/temp-feeds/6f79b23e-0e0f-45a1-b4bf-ecc5234aeca2.atom
  97. +53 −0 src/ProductCatalog.Tests/Data/temp-feeds/af0107b4-c860-42c2-85c0-152a39c38061.atom
  98. +53 −0 src/ProductCatalog.Tests/Data/temp-feeds/bca54d20-8745-4fe2-bf1a-0e018188b0a4.atom
  99. +53 −0 src/ProductCatalog.Tests/Data/temp-feeds/f8bead64-569e-4c5a-8b6d-450116138315.atom
  100. +24 −0 src/ProductCatalog.Tests/Notifications/Http/CacheControlTests.cs
  101. +17 −0 src/ProductCatalog.Tests/Notifications/Http/ContentTypeTests.cs
  102. +37 −0 src/ProductCatalog.Tests/Notifications/Http/ETagTests.cs
  103. +35 −0 src/ProductCatalog.Tests/Notifications/Http/HeaderQueryTests.cs
  104. +41 −0 src/ProductCatalog.Tests/Notifications/Http/IfNoneMatchTests.cs
  105. +25 −0 src/ProductCatalog.Tests/Notifications/Http/NullConditionTests.cs
  106. +23 −0 src/ProductCatalog.Tests/Notifications/Http/ResponseContextTests.cs
  107. +43 −0 src/ProductCatalog.Tests/Notifications/Http/SendChunkedTests.cs
  108. +26 −0 src/ProductCatalog.Tests/Notifications/Model/ArchiveFeedTests.cs
  109. +65 −0 src/ProductCatalog.Tests/Notifications/Model/CopyEntityBodyTests.cs
  110. +94 −0 src/ProductCatalog.Tests/Notifications/Model/FeedMappingsTests.cs
  111. +26 −0 src/ProductCatalog.Tests/Notifications/Model/FeedOfRecentEventsTests.cs
  112. +32 −0 src/ProductCatalog.Tests/Notifications/Model/HeadersOnlyRepresentationTests.cs
  113. +26 −0 src/ProductCatalog.Tests/Notifications/Model/NullRepresentationTests.cs
  114. +77 −0 src/ProductCatalog.Tests/Notifications/Model/RepositoryTests.cs
  115. +39 −0 src/ProductCatalog.Tests/Notifications/Model/ResourceIdTests.cs
  116. +27 −0 src/ProductCatalog.Tests/Notifications/Model/ResourceIdToStoreIdConverterTests.cs
  117. +87 −0 src/ProductCatalog.Tests/Notifications/Model/RewriteEntityBodyTests.cs
  118. +33 −0 src/ProductCatalog.Tests/Notifications/Model/WorkingFeedTests.cs
  119. +79 −0 src/ProductCatalog.Tests/Notifications/Net/HttpListenerRequestWrapperTests.cs
  120. +142 −0 src/ProductCatalog.Tests/Notifications/Net/HttpListenerResponseWrapperTests.cs
  121. +144 −0 src/ProductCatalog.Tests/Notifications/NotificationsServiceTests.cs
  122. +89 −0 src/ProductCatalog.Tests/Notifications/Persistence/FileBasedAtomDocumentTests.cs
  123. +60 −0 src/ProductCatalog.Tests/Notifications/Persistence/FileStoreTests.cs
  124. +28 −0 src/ProductCatalog.Tests/Notifications/Persistence/StoreIdTests.cs
  125. +24 −0 src/ProductCatalog.Tests/Notifications/Service/NullFeedMappingsTests.cs
  126. +85 −0 src/ProductCatalog.Tests/Notifications/Service/RoutesTests.cs
  127. +17 −0 src/ProductCatalog.Tests/Notifications/Service/ServiceHostTests.cs
  128. +25 −0 src/ProductCatalog.Tests/Notifications/Utility/Input.cs
  129. +116 −0 src/ProductCatalog.Tests/Notifications/Utility/Output.cs
  130. +54 −0 src/ProductCatalog.Tests/Notifications/Utility/StreamBackedRepresentation.cs
  131. +79 −0 src/ProductCatalog.Tests/Notifications/Utility/WebServer.cs
  132. +206 −0 src/ProductCatalog.Tests/ProductCatalog.Tests.csproj
  133. +39 −0 src/ProductCatalog.Tests/Properties/AssemblyInfo.cs
  134. +18 −0 src/ProductCatalog.Tests/Shared/Utility/ResourceStreams.cs
  135. +243 −0 src/ProductCatalog.Tests/Writer/FeedWriterTests.cs
  136. +40 −0 src/ProductCatalog.Tests/Writer/Feeds/ArchiveFeedTests.cs
  137. +47 −0 src/ProductCatalog.Tests/Writer/Feeds/EntryTests.cs
  138. +50 −0 src/ProductCatalog.Tests/Writer/Feeds/FeedBuilderTests.cs
  139. +43 −0 src/ProductCatalog.Tests/Writer/Feeds/FeedMappingTests.cs
  140. +67 −0 src/ProductCatalog.Tests/Writer/Feeds/IdTests.cs
  141. +67 −0 src/ProductCatalog.Tests/Writer/Feeds/LinksTests.cs
  142. +39 −0 src/ProductCatalog.Tests/Writer/Feeds/PrevArchiveLinkGeneratorTests.cs
  143. +128 −0 src/ProductCatalog.Tests/Writer/Feeds/RecentEventsFeedTests.cs
  144. +62 −0 src/ProductCatalog.Tests/Writer/Model/EventBufferTests.cs
  145. +99 −0 src/ProductCatalog.Tests/Writer/Persistence/FileNameTests.cs
  146. +51 −0 src/ProductCatalog.Tests/Writer/Tasks/ArchivingRecentEventsFeedTests.cs
  147. +32 −0 src/ProductCatalog.Tests/Writer/Tasks/CreatingNewRecentEventsFeedTests.cs
  148. +58 −0 src/ProductCatalog.Tests/Writer/Tasks/IdentifyingRecentEventsFeedTests.cs
  149. +45 −0 src/ProductCatalog.Tests/Writer/Tasks/NotifyingListenersTests.cs
  150. +43 −0 src/ProductCatalog.Tests/Writer/Tasks/QueryingEventsTests.cs
  151. +47 −0 src/ProductCatalog.Tests/Writer/Tasks/RequeryingEventsTests.cs
  152. +44 −0 src/ProductCatalog.Tests/Writer/Tasks/SavingRecentEventsFeedTests.cs
  153. +15 −0 src/ProductCatalog.Tests/Writer/Tasks/TerminateTests.cs
  154. +85 −0 src/ProductCatalog.Tests/Writer/Tasks/UpdatingRecentEventsFeedTests.cs
  155. +19 −0 src/ProductCatalog.Tests/Writer/Utility/ArchiveFeedExtensions.cs
  156. +13 −0 src/ProductCatalog.Tests/Writer/Utility/EntryExtensions.cs
  157. +17 −0 src/ProductCatalog.Tests/Writer/Utility/EventBodyBuilder.cs
  158. +40 −0 src/ProductCatalog.Tests/Writer/Utility/EventBufferBuilder.cs
  159. +30 −0 src/ProductCatalog.Tests/Writer/Utility/EventBuilder.cs
  160. +34 −0 src/ProductCatalog.Tests/Writer/Utility/FakeTimer.cs
  161. +18 −0 src/ProductCatalog.Tests/Writer/Utility/FeedMappingExtensions.cs
  162. +12 −0 src/ProductCatalog.Tests/Writer/Utility/FileNameExtensions.cs
  163. +20 −0 src/ProductCatalog.Tests/Writer/Utility/IStateExtensions.cs
  164. +12 −0 src/ProductCatalog.Tests/Writer/Utility/IdExtensions.cs
  165. +93 −0 src/ProductCatalog.Tests/Writer/Utility/InMemoryFileSystem.cs
  166. +13 −0 src/ProductCatalog.Tests/Writer/Utility/PrivateField.cs
  167. +61 −0 src/ProductCatalog.Tests/Writer/Utility/RecentEventsFeedBuilder.cs
  168. +24 −0 src/ProductCatalog.Tests/Writer/Utility/RecentEventsFeedExtensions.cs
  169. +65 −0 src/ProductCatalog.Tests/Writer/Utility/Repeat.cs
  170. +14 −0 src/ProductCatalog.Tests/Writer/Utility/SampleLinks.cs
  171. +17 −0 src/ProductCatalog.Tests/Writer/Utility/SyndicationFeeds.cs
  172. +76 −0 src/ProductCatalog.Writer/FeedWriter.cs
  173. +32 −0 src/ProductCatalog.Writer/Feeds/ArchiveFeed.cs
  174. +32 −0 src/ProductCatalog.Writer/Feeds/Entry.cs
  175. +89 −0 src/ProductCatalog.Writer/Feeds/FeedBuilder.cs
  176. +46 −0 src/ProductCatalog.Writer/Feeds/FeedMapping.cs
  177. +9 −0 src/ProductCatalog.Writer/Feeds/IPrevArchiveLinkGenerator.cs
  178. +62 −0 src/ProductCatalog.Writer/Feeds/Id.cs
  179. +67 −0 src/ProductCatalog.Writer/Feeds/Links.cs
  180. +29 −0 src/ProductCatalog.Writer/Feeds/PrevArchiveLinkGenerator.cs
  181. +66 −0 src/ProductCatalog.Writer/Feeds/RecentEventsFeed.cs
  182. +11 −0 src/ProductCatalog.Writer/ITimer.cs
  183. +40 −0 src/ProductCatalog.Writer/Model/Event.cs
  184. +33 −0 src/ProductCatalog.Writer/Model/EventBody.cs
  185. +33 −0 src/ProductCatalog.Writer/Model/EventBuffer.cs
  186. +10 −0 src/ProductCatalog.Writer/Model/IEventBuffer.cs
  187. +71 −0 src/ProductCatalog.Writer/Persistence/Directory.cs
  188. +67 −0 src/ProductCatalog.Writer/Persistence/FileName.cs
  189. +33 −0 src/ProductCatalog.Writer/Persistence/FileSystem.cs
  190. +14 −0 src/ProductCatalog.Writer/Persistence/IDirectory.cs
  191. +9 −0 src/ProductCatalog.Writer/Persistence/IFileSystem.cs
  192. +36 −0 src/ProductCatalog.Writer/Persistence/Reaper.cs
  193. +108 −0 src/ProductCatalog.Writer/ProductCatalog.Writer.csproj
  194. +36 −0 src/ProductCatalog.Writer/Properties/AssemblyInfo.cs
  195. +52 −0 src/ProductCatalog.Writer/ScheduledTimer.cs
  196. +42 −0 src/ProductCatalog.Writer/Tasks/ArchivingRecentEventsFeed.cs
  197. +36 −0 src/ProductCatalog.Writer/Tasks/CreatingNewRecentEventsFeed.cs
  198. +14 −0 src/ProductCatalog.Writer/Tasks/ITask.cs
  199. +45 −0 src/ProductCatalog.Writer/Tasks/IdentifyingRecentEventsFeed.cs
  200. +35 −0 src/ProductCatalog.Writer/Tasks/NotifyingListeners.cs
  201. +43 −0 src/ProductCatalog.Writer/Tasks/QueryingEvents.cs
  202. +43 −0 src/ProductCatalog.Writer/Tasks/RequeryingEvents.cs
  203. +35 −0 src/ProductCatalog.Writer/Tasks/SavingRecentEventsFeed.cs
  204. +30 −0 src/ProductCatalog.Writer/Tasks/Terminate.cs
  205. +56 −0 src/ProductCatalog.Writer/Tasks/UpdatingRecentEventsFeed.cs
  206. +340 −0 tools/nant/COPYING.txt
  207. BIN tools/nant/CollectionGen.dll
  208. BIN tools/nant/Interop.MsmMergeTypeLib.dll
  209. BIN tools/nant/Interop.StarTeam.dll
  210. BIN tools/nant/Interop.WindowsInstaller.dll
  211. BIN tools/nant/NAnt.CompressionTasks.dll
  212. BIN tools/nant/NAnt.Contrib.Tasks.dll
  213. BIN tools/nant/NAnt.Core.dll
  214. BIN tools/nant/NAnt.DotNetTasks.dll
  215. BIN tools/nant/NAnt.MSNetTasks.dll
  216. BIN tools/nant/NAnt.NUnit.dll
  217. BIN tools/nant/NAnt.NUnit1Tasks.dll
  218. BIN tools/nant/NAnt.NUnit2Tasks.dll
  219. BIN tools/nant/NAnt.SourceControlTasks.dll
  220. BIN tools/nant/NAnt.VSNetTasks.dll
  221. BIN tools/nant/NAnt.VisualCppTasks.dll
  222. BIN tools/nant/NAnt.Win32Tasks.dll
  223. BIN tools/nant/NAnt.exe
  224. +1,918 −0 tools/nant/NAnt.exe.config
  225. BIN tools/nant/NDoc.Documenter.NAnt.dll
  226. +144 −0 tools/nant/README.txt
  227. BIN tools/nant/SLiNgshoT.Core.dll
  228. BIN tools/nant/SLiNgshoT.exe
  229. BIN tools/nant/SourceSafe.Interop.dll
  230. BIN tools/nant/extensions/common/2.0/NAnt.MSBuild.dll
  231. +37 −0 tools/nant/extensions/common/2.0/NAnt.MSBuild.xml
  232. BIN tools/nant/lib/common/neutral/ICSharpCode.SharpCvsLib.Console.dll
  233. BIN tools/nant/lib/common/neutral/ICSharpCode.SharpCvsLib.dll
  234. BIN tools/nant/lib/common/neutral/ICSharpCode.SharpZipLib.dll
  235. BIN tools/nant/lib/common/neutral/NUnitCore.dll
  236. BIN tools/nant/lib/mono/1.0/NDoc.Core.dll
  237. BIN tools/nant/lib/mono/1.0/NDoc.Documenter.Msdn.dll
  238. BIN tools/nant/lib/mono/1.0/NDoc.ExtendedUI.dll
  239. BIN tools/nant/lib/mono/1.0/nunit.core.dll
  240. BIN tools/nant/lib/mono/1.0/nunit.framework.dll
  241. BIN tools/nant/lib/mono/1.0/nunit.util.dll
  242. BIN tools/nant/lib/mono/2.0/NDoc.Core.dll
  243. BIN tools/nant/lib/mono/2.0/NDoc.Documenter.Msdn.dll
  244. BIN tools/nant/lib/mono/2.0/NDoc.ExtendedUI.dll
  245. BIN tools/nant/lib/mono/2.0/nunit.core.dll
  246. BIN tools/nant/lib/mono/2.0/nunit.framework.dll
  247. BIN tools/nant/lib/mono/2.0/nunit.util.dll
  248. BIN tools/nant/lib/net/1.0/NDoc.Core.dll
  249. BIN tools/nant/lib/net/1.0/NDoc.Documenter.Msdn.dll
  250. BIN tools/nant/lib/net/1.0/NDoc.ExtendedUI.dll
  251. BIN tools/nant/lib/net/1.0/nunit.core.dll
  252. BIN tools/nant/lib/net/1.0/nunit.framework.dll
  253. BIN tools/nant/lib/net/1.0/nunit.util.dll
  254. BIN tools/nant/lib/net/1.1/NDoc.Core.dll
  255. BIN tools/nant/lib/net/1.1/NDoc.Documenter.Msdn.dll
  256. BIN tools/nant/lib/net/1.1/NDoc.ExtendedUI.dll
  257. BIN tools/nant/lib/net/1.1/nunit.core.dll
  258. BIN tools/nant/lib/net/1.1/nunit.framework.dll
  259. BIN tools/nant/lib/net/1.1/nunit.util.dll
  260. BIN tools/nant/lib/net/2.0/NDoc.Core.dll
  261. BIN tools/nant/lib/net/2.0/NDoc.Documenter.Msdn.dll
  262. BIN tools/nant/lib/net/2.0/NDoc.ExtendedUI.dll
  263. BIN tools/nant/lib/net/2.0/nunit.core.dll
  264. BIN tools/nant/lib/net/2.0/nunit.framework.dll
  265. BIN tools/nant/lib/net/2.0/nunit.util.dll
  266. BIN tools/nant/log4net.dll
  267. BIN tools/nant/scvs.exe
  268. +277 −0 tools/nunit/NUnitFitTests.html
  269. +84 −0 tools/nunit/NUnitTests.config
  270. +14 −0 tools/nunit/NUnitTests.nunit
  271. +4 −0 tools/nunit/agent.conf
  272. +342 −0 tools/nunit/fit-license.txt
  273. BIN tools/nunit/framework/nunit.framework.dll
  274. +9,803 −0 tools/nunit/framework/nunit.framework.xml
  275. BIN tools/nunit/framework/nunit.mocks.dll
  276. BIN tools/nunit/framework/pnunit.framework.dll
  277. BIN tools/nunit/lib/failure.jpg
  278. BIN tools/nunit/lib/fit.dll
  279. BIN tools/nunit/lib/ignored.jpg
  280. BIN tools/nunit/lib/log4net.dll
  281. BIN tools/nunit/lib/nunit-console-runner.dll
  282. BIN tools/nunit/lib/nunit-gui-runner.dll
  283. BIN tools/nunit/lib/nunit.core.dll
  284. BIN tools/nunit/lib/nunit.core.interfaces.dll
  285. BIN tools/nunit/lib/nunit.fixtures.dll
  286. BIN tools/nunit/lib/nunit.uiexception.dll
  287. BIN tools/nunit/lib/nunit.uikit.dll
  288. BIN tools/nunit/lib/nunit.util.dll
  289. BIN tools/nunit/lib/success.jpg
  290. +15 −0 tools/nunit/license.txt
  291. BIN tools/nunit/nunit-agent.exe
  292. +87 −0 tools/nunit/nunit-agent.exe.config
  293. BIN tools/nunit/nunit-console-x86.exe
  294. +87 −0 tools/nunit/nunit-console-x86.exe.config
  295. BIN tools/nunit/nunit-console.exe
  296. +87 −0 tools/nunit/nunit-console.exe.config
  297. BIN tools/nunit/nunit-x86.exe
  298. +95 −0 tools/nunit/nunit-x86.exe.config
  299. BIN tools/nunit/nunit.exe
  300. +95 −0 tools/nunit/nunit.exe.config
Sorry, we could not display the entire diff because too many files (325) changed.
View
57 LICENSE.txt
@@ -0,0 +1,57 @@
+Apache License, Version 2.0
+
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+ 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+ 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+ 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
View
15 NOTICE.txt
@@ -0,0 +1,15 @@
+ **
+ ** NOTICE file corresponding to the section 4 (d) of the Apache License,
+ ** Version 2.0, in this case for the Apache log4net distribution.
+ **
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ Please read the LICENSE files present in the root directory of this
+ distribution.
+
+ The names "log4net" and "Apache Software Foundation" must not be used to
+ endorse or promote products derived from this software without prior
+ written permission. For written permission, please contact
+ apache@apache.org.
View
7 README.txt
@@ -0,0 +1,7 @@
+Before you run the .NET example, you must reserve the following HTTP namespace:
+
+http://+:8080/fulfillment
+
+To reserve this namespace, follow the instructions in the section "Configuring Namespace Reservations" here:
+
+http://msdn.microsoft.com/en-us/library/ms733768.aspx
View
57 Rakefile
@@ -0,0 +1,57 @@
+require 'rubygems'
+require 'albacore'
+require 'rake/clean'
+
+BASE_DIR=File.dirname(__FILE__)
+OUTPUT_DIR="#{BASE_DIR}/output"
+FILENAME_EXE="ProductCatalog.Host.exe"
+OUTPUT_EXE="#{OUTPUT_DIR}/#{FILENAME_EXE}"
+BIN_DIR="#{BASE_DIR}/src/ProductCatalog.Host/bin/Debug"
+BIN_EXE="#{BASE_DIR}/src/ProductCatalog.Host/bin/Debug/#{FILENAME_EXE}"
+PACKAGE_SET=FileList["#{BIN_DIR}/**/*.exe","#{BIN_DIR}/**/*.exe.config","#{BIN_DIR}/**/*.dll"]
+NUNIT_CONSOLE="#{BASE_DIR}/tools/nunit/nunit-console.exe"
+TEST_ASSEMBLIES="#{BASE_DIR}/src/ProductCatalog.Tests/bin/Debug/ProductCatalog.Tests.dll"
+SOLUTION_FILE="#{BASE_DIR}/Restbucks.ProductCatalog.sln"
+CLEAN << OUTPUT_DIR
+
+
+task :default => :build
+
+
+msbuild :clean do |msb|
+ msb.use :net35
+ msb.targets :Clean
+ msb.solution = SOLUTION_FILE
+end
+
+
+desc 'Compile the application and unit tests.'
+msbuild :compile do |msb|
+ msb.use :net35
+ msb.targets :Build
+ msb.solution = SOLUTION_FILE
+end
+
+
+desc 'Package the application into the output folder.'
+task :package => [:build] do
+ mkdir OUTPUT_DIR unless File.exists? OUTPUT_DIR
+ PACKAGE_SET.each do |file|
+ cp file, OUTPUT_DIR
+ end
+end
+
+
+desc 'Build the system.'
+task :build => [:clean, :compile, :test]
+
+desc 'Run unit tests.'
+nunit :test => :compile do |nunit|
+ nunit.command = NUNIT_CONSOLE
+ nunit.assemblies TEST_ASSEMBLIES
+end
+
+desc 'Run the Product Catalogue application.'
+task :run => :compile do
+ %x{start "Product Catalogue" "#{BIN_EXE}"}
+end
View
44 Restbucks.ProductCatalog.sln
@@ -0,0 +1,44 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductCatalog.Tests", "src\ProductCatalog.Tests\ProductCatalog.Tests.csproj", "{872BCFE9-4332-49D5-A09D-09649EA45C49}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductCatalog.Host", "src\ProductCatalog.Host\ProductCatalog.Host.csproj", "{9E1FD220-0216-41DC-AE25-DB5A5079AF06}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductCatalog.Notifications", "src\ProductCatalog.Notifications\ProductCatalog.Notifications.csproj", "{4A73DF42-641F-4BDE-ACE1-164594A5425D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductCatalog.Shared", "src\ProductCatalog.Shared\ProductCatalog.Shared.csproj", "{C502815C-5419-42FE-9A45-625370057CC8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductCatalog.Writer", "src\ProductCatalog.Writer\ProductCatalog.Writer.csproj", "{E09B0A4A-E0D0-4A26-9FAF-CF5F80F5B6C1}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {872BCFE9-4332-49D5-A09D-09649EA45C49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {872BCFE9-4332-49D5-A09D-09649EA45C49}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {872BCFE9-4332-49D5-A09D-09649EA45C49}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {872BCFE9-4332-49D5-A09D-09649EA45C49}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9E1FD220-0216-41DC-AE25-DB5A5079AF06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9E1FD220-0216-41DC-AE25-DB5A5079AF06}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9E1FD220-0216-41DC-AE25-DB5A5079AF06}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9E1FD220-0216-41DC-AE25-DB5A5079AF06}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4A73DF42-641F-4BDE-ACE1-164594A5425D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4A73DF42-641F-4BDE-ACE1-164594A5425D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4A73DF42-641F-4BDE-ACE1-164594A5425D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4A73DF42-641F-4BDE-ACE1-164594A5425D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C502815C-5419-42FE-9A45-625370057CC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C502815C-5419-42FE-9A45-625370057CC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C502815C-5419-42FE-9A45-625370057CC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C502815C-5419-42FE-9A45-625370057CC8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E09B0A4A-E0D0-4A26-9FAF-CF5F80F5B6C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E09B0A4A-E0D0-4A26-9FAF-CF5F80F5B6C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E09B0A4A-E0D0-4A26-9FAF-CF5F80F5B6C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E09B0A4A-E0D0-4A26-9FAF-CF5F80F5B6C1}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
View
411 TestResult.xml
@@ -0,0 +1,411 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<!--This file represents the results of running a test suite-->
+<test-results name="c:/Documents and Settings/Administrator/My Documents/Downloads/Chapter07-DotNetProductCatalogService/ProductCatalogService/src/ProductCatalog.Tests/bin/Debug/ProductCatalog.Tests.dll" total="157" errors="0" failures="0" not-run="0" ignored="0" skipped="0" invalid="0" date="2011-08-24" time="07:44:33">
+ <environment nunit-version="2.5.0.9122" clr-version="2.0.50727.3623" os-version="Microsoft Windows NT 5.1.2600 Service Pack 3" platform="Win32NT" cwd="c:\Documents and Settings\Administrator\My Documents\Downloads\Chapter07-DotNetProductCatalogService\ProductCatalogService" machine-name="NATHAN-573ECC14" user="Administrator" user-domain="NATHAN-573ECC14" />
+ <culture-info current-culture="en-US" current-uiculture="en-US" />
+ <test-suite name="c:/Documents and Settings/Administrator/My Documents/Downloads/Chapter07-DotNetProductCatalogService/ProductCatalogService/src/ProductCatalog.Tests/bin/Debug/ProductCatalog.Tests.dll" executed="True" success="True" time="3.047" asserts="0">
+ <results>
+ <test-suite name="ProductCatalog" executed="True" success="True" time="3.047" asserts="0">
+ <results>
+ <test-suite name="Tests" executed="True" success="True" time="3.047" asserts="0">
+ <results>
+ <test-suite name="Notifications" executed="True" success="True" time="1.563" asserts="0">
+ <results>
+ <test-suite name="Http" executed="True" success="True" time="0.063" asserts="0">
+ <results>
+ <test-suite name="CacheControlTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Http.CacheControlTests.LongCachingPolicyShouldSetLongMaxAgeCacheControlHeader" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Http.CacheControlTests.ShortCachingPolicyShouldSetShortMaxAgeCacheControlHeader" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="ContentTypeTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Http.ContentTypeTests.AtomFeedShouldAddAtomContentTypeHeaderWithFeedTypeParameter" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="ETagTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Http.ETagTests.ShouldExhibitValueTypeEquality" executed="True" success="True" time="0.000" asserts="10" />
+ <test-case name="ProductCatalog.Tests.Notifications.Http.ETagTests.ShouldWriteETagValueToHeader" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="HeaderQueryTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Http.HeaderQueryTests.ShouldMatchHeaderInNestedRepresentation" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Http.HeaderQueryTests.WhenRepresentationContainsSpecifiedHeaderShouldReturnTrue" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Http.HeaderQueryTests.WhenRepresentationDoesNotContainSpecifiedHeaderShouldReturnFalse" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="IfNoneMatchTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Http.IfNoneMatchTests.IfETagDoesNotMatchShouldReturnOK" executed="True" success="True" time="0.016" asserts="3" />
+ <test-case name="ProductCatalog.Tests.Notifications.Http.IfNoneMatchTests.IfETagMatchesShouldReturnNotModified" executed="True" success="True" time="0.000" asserts="3" />
+ </results>
+ </test-suite>
+ <test-suite name="NullConditionTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Http.NullConditionTests.ShouldAlwaysReturnOK" executed="True" success="True" time="0.000" asserts="2" />
+ </results>
+ </test-suite>
+ <test-suite name="ResponseContextTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Http.ResponseContextTests.IfSuppliedHeaderMatchesContainedHeaderShouldReturnTrue" executed="True" success="True" time="0.000" asserts="4" />
+ </results>
+ </test-suite>
+ <test-suite name="SendChunkedTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Http.SendChunkedTests.WhenChunkingIsNotRequiredShouldWriteContentLengthToResponseButShouldSetIsChunkedToFalse" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Notifications.Http.SendChunkedTests.WhenChunkingIsRequiredShouldNotWriteContentLengthButShouldSetIsChunkedToTrue" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Notifications.Http.SendChunkedTests.WhenWritingToResponseWhenChunkingIsNotRequiredShouldThrowException" executed="True" success="True" time="0.016" asserts="0" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="Model" executed="True" success="True" time="0.813" asserts="0">
+ <results>
+ <test-suite name="ArchiveFeedTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.ArchiveFeedTests.ShouldAddLongCachingPolicyCacheControlHeader" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.ArchiveFeedTests.ShouldNotTransformEntityBody" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="CopyEntityBodyTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.CopyEntityBodyTests.ShouldCloseSourceStream" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.CopyEntityBodyTests.ShouldCopyEntityBodyWithoutTransformingContents" executed="True" success="True" time="0.000" asserts="3" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.CopyEntityBodyTests.ShouldNotCloseDestinationStream" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="FeedMappingsTests" executed="True" success="True" time="0.734" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.FeedMappingsTests.ShouldReturnAccessorForFeedOfRecentEvents" executed="True" success="True" time="0.328" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.FeedMappingsTests.WhenPresentedWithResouceIdForCurrentFeedReturnsAccessorThatGetsCurrentFeedFromStore" executed="True" success="True" time="0.313" asserts="3" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.FeedMappingsTests.WhenPresentedWithResouceIdForNonCurrentFeedReturnsAccessorThatGetsArchiveFeedFromStore" executed="True" success="True" time="0.000" asserts="2" />
+ </results>
+ </test-suite>
+ <test-suite name="FeedOfRecentEventsTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.FeedOfRecentEventsTests.ShouldAddShortCachingPolicyCacheControlHeader" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.FeedOfRecentEventsTests.ShouldNotTransformEntityBody" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="HeadersOnlyRepresentationTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.HeadersOnlyRepresentationTests.AddsHeadersToResponse" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.HeadersOnlyRepresentationTests.CallsInnerRepresentation" executed="True" success="True" time="0.000" asserts="2" />
+ </results>
+ </test-suite>
+ <test-suite name="NullRepresentationTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.NullRepresentationTests.ShouldNotAddAnythingToResponse" executed="True" success="True" time="0.000" asserts="9" />
+ </results>
+ </test-suite>
+ <test-suite name="RepositoryTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.RepositoryTests.IfConverterIsNullShouldThrowException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.RepositoryTests.IfStoreIsNullShouldThrowException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.RepositoryTests.ShouldGetAllOtherFeeds" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.RepositoryTests.ShouldGetFeedOfRecentEvents" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="ResourceIdTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.ResourceIdTests.ComplexValue" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.ResourceIdTests.ShouldExhibitValueTypeEquality" executed="True" success="True" time="0.000" asserts="9" />
+ </results>
+ </test-suite>
+ <test-suite name="ResourceIdToStoreIdConverterTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.ResourceIdToStoreIdConverterTests.IfFunctionIsNullShouldThrowException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.ResourceIdToStoreIdConverterTests.WhenGivenResourceIdShouldConvertToStoreId" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="RewriteEntityBodyTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.RewriteEntityBodyTests.ShouldCloseSourceStream" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.RewriteEntityBodyTests.ShouldNotCloseDestinationStream" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.RewriteEntityBodyTests.ShouldRemoveViaLink" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.RewriteEntityBodyTests.ShouldSetSelfLinkHrefValueToHrefValueOfViaLink" executed="True" success="True" time="0.016" asserts="3" />
+ </results>
+ </test-suite>
+ <test-suite name="WorkingFeedTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Model.WorkingFeedTests.ShouldAddShortCachingPolicyCacheControlHeader" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Model.WorkingFeedTests.ShouldTransformLinksInEntityBody" executed="True" success="True" time="0.000" asserts="2" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="Net" executed="True" success="True" time="0.438" asserts="0">
+ <results>
+ <test-suite name="HttpListenerRequestWrapperTests" executed="True" success="True" time="0.297" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerRequestWrapperTests.IfETagIsEmptyShouldReturnNullCondition" executed="True" success="True" time="0.266" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerRequestWrapperTests.IfETagIsNotEmptyShouldReturnIfNoneMatchCondition" executed="True" success="True" time="0.031" asserts="4" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerRequestWrapperTests.ShouldReturnRequestUri" executed="True" success="True" time="0.000" asserts="2" />
+ </results>
+ </test-suite>
+ <test-suite name="HttpListenerResponseWrapperTests" executed="True" success="True" time="0.141" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerResponseWrapperTests.ShouldNotSetContentLengthHeaderWhenChunked" executed="True" success="True" time="0.031" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerResponseWrapperTests.ShouldSetCacheControlHeader" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerResponseWrapperTests.ShouldSetContentLengthHeader" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerResponseWrapperTests.ShouldSetContentTypeHeader" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerResponseWrapperTests.ShouldSetETagHeader" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerResponseWrapperTests.ShouldSetStatusCodeAndDescription" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerResponseWrapperTests.ShouldSetTransferEncodingHeader" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerResponseWrapperTests.ShouldWriteEntityBody" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Net.HttpListenerResponseWrapperTests.ShouldWriteLastModifiedHeader" executed="True" success="True" time="0.016" asserts="1" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="NotificationsServiceTests" executed="True" success="True" time="0.156" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.NotificationsServiceTests.IfRepositoryIsNullThrowsException" executed="True" success="True" time="0.016" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.NotificationsServiceTests.IfRoutesIsNullThrowsException" executed="True" success="True" time="0.016" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.NotificationsServiceTests.WhenFeedDoesNotExistShouldReturnNotFound" executed="True" success="True" time="0.078" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Notifications.NotificationsServiceTests.WhenRequestIsForAnyOtherFeedShouldReturnCorrespondingFeed" executed="True" success="True" time="0.000" asserts="3" />
+ <test-case name="ProductCatalog.Tests.Notifications.NotificationsServiceTests.WhenRequestIsForRecentFeedShouldReturnCurrentFeed" executed="True" success="True" time="0.000" asserts="3" />
+ <test-case name="ProductCatalog.Tests.Notifications.NotificationsServiceTests.WhenServerEncountersErrorShouldReturnInternalServerError" executed="True" success="True" time="0.016" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Notifications.NotificationsServiceTests.WhenUriIsNotRecognizedShouldReturnNotFound" executed="True" success="True" time="0.000" asserts="2" />
+ </results>
+ </test-suite>
+ <test-suite name="Persistence" executed="True" success="True" time="0.078" asserts="0">
+ <results>
+ <test-suite name="FileBasedAtomDocumentTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.FileBasedAtomDocumentTests.IfFileDoesNotExistThrowsException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.FileBasedAtomDocumentTests.ShouldWriteAtomContentTypeHeaderToResponse" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.FileBasedAtomDocumentTests.ShouldWriteETagHeaderToResponse" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.FileBasedAtomDocumentTests.ShouldWriteLastUpdatedDateTimeToResponse" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.FileBasedAtomDocumentTests.WhenSendChunkedIsFalseShouldWriteLengthHeaderToResponse" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.FileBasedAtomDocumentTests.WhenSendChunkedIsTrueShouldNotWriteLengthHeaderToResponse" executed="True" success="True" time="0.000" asserts="2" />
+ </results>
+ </test-suite>
+ <test-suite name="FileStoreTests" executed="True" success="True" time="0.063" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.FileStoreTests.IfFileSystemConfigurationIsNullShouldThrowException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.FileStoreTests.ShouldRetrieveArchiveFeedBasedOnStoreId" executed="True" success="True" time="0.047" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.FileStoreTests.ShouldRetrieveCurrentFeedBasedOnStoreId" executed="True" success="True" time="0.016" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="StoreIdTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Persistence.StoreIdTests.ShouldExhibitValueTypeEquality" executed="True" success="True" time="0.000" asserts="9" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="Service" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-suite name="NullFeedMappingsTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Service.NullFeedMappingsTests.CreateStoreAccessorForCurrentFeedThrowsException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Service.NullFeedMappingsTests.CreateStoreAccessorThrowsException" executed="True" success="True" time="0.000" asserts="0" />
+ </results>
+ </test-suite>
+ <test-suite name="RoutesTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Service.RoutesTests.IfUriIsNotRecognizedThrowsException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Service.RoutesTests.ShouldThrowExceptionIfUriConfigurationIsNull" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Notifications.Service.RoutesTests.WhenRequestIsForAnotherFeedShouldReturnCommandThatGetsAnotherFeed" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Notifications.Service.RoutesTests.WhenRequestIsForFeedOfRecentEventsShouldReturnCommandThatGetsCurrentFeed" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="ServiceHostTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Notifications.Service.ServiceHostTests.IfServiceIsNullShouldThrowException" executed="True" success="True" time="0.000" asserts="0" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="Writer" executed="True" success="True" time="1.453" asserts="0">
+ <results>
+ <test-suite name="Feeds" executed="True" success="True" time="1.328" asserts="0">
+ <results>
+ <test-suite name="ArchiveFeedTests" executed="True" success="True" time="0.188" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.ArchiveFeedTests.ShouldSaveFeedToArchiveDirectory" executed="True" success="True" time="0.188" asserts="7" />
+ </results>
+ </test-suite>
+ <test-suite name="EntryTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.EntryTests.ShouldAddSelfToTopOfFeed" executed="True" success="True" time="0.000" asserts="3" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.EntryTests.ShouldSaveEntryToEntryDirectory" executed="True" success="True" time="0.016" asserts="3" />
+ </results>
+ </test-suite>
+ <test-suite name="FeedBuilderTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.FeedBuilderTests.GivenAnEventShouldCreateEntryRepresentingThatEvent" executed="True" success="True" time="0.000" asserts="6" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.FeedBuilderTests.ShouldBeAbleToLoadFeedFromCurrentDirectory" executed="True" success="True" time="0.016" asserts="2" />
+ </results>
+ </test-suite>
+ <test-suite name="FeedMappingTests" executed="True" success="True" time="0.031" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.FeedMappingTests.NewFeedMappingShouldHaveTempFileName" executed="True" success="True" time="0.031" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.FeedMappingTests.WithNextIdShouldReturnMappingWithNextIdAndNewFileName" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.FeedMappingTests.WithPermanentFileNameShouldReturnMappingWithFileNameDerivedFromId" executed="True" success="True" time="0.000" asserts="3" />
+ </results>
+ </test-suite>
+ <test-suite name="IdTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.IdTests.ShouldBeAbleToCloneSelf" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.IdTests.ShouldBeAbleToReturnFileNameDerivedFromValue" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.IdTests.ShouldBeAbleToReturnUriDerivedFromValue" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.IdTests.ShouldExhibitValueTypeEquality" executed="True" success="True" time="0.000" asserts="9" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.IdTests.ToStringShouldReturnStringValueOfId" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="LinksTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.LinksTests.ShouldBeAbleToCreateEntrySelfLink" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.LinksTests.ShouldBeAbleToCreateNextArchiveLink" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.LinksTests.ShouldBeAbleToCreatePrevArchiveLink" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.LinksTests.ShouldBeAbleToCreateRecentFeedSelfLink" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.LinksTests.ShouldBeAbleToCreateViaLink" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.LinksTests.ShouldBeAbleToParseResourceIdFromUri" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="PrevArchiveLinkGeneratorTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.PrevArchiveLinkGeneratorTests.CanAddPrevArchiveLinkToFeed" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.PrevArchiveLinkGeneratorTests.NullGeneratorDoesNotAddPrevArchiveLinkToFeed" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="RecentEventsFeedTests" executed="True" success="True" time="1.031" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.RecentEventsFeedTests.IfThereIsNoPreviousFeedTheFeedShouldNotIncludeAPreviousArchiveLink" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.RecentEventsFeedTests.ShouldCreateSyndicationFeed" executed="True" success="True" time="0.000" asserts="8" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.RecentEventsFeedTests.ShouldSaveFeedToCurrentDirectory" executed="True" success="True" time="0.000" asserts="7" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.RecentEventsFeedTests.WhenAnEntryIsAddedToTheFeedTheUpdatedElementOnTheFeedShouldBeUpdated" executed="True" success="True" time="1.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.RecentEventsFeedTests.WhenArchivingShouldAddANextArchiveLink" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.RecentEventsFeedTests.WhenArchivingShouldAddArchiveSimpleExtensionElement" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.RecentEventsFeedTests.WhenArchivingShouldRemoveViaLink" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Feeds.RecentEventsFeedTests.WhenArchivingShouldSetSelfLinkToValueOfFormerViaLink" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="FeedWriterTests" executed="True" success="True" time="0.047" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.IfEventBufferIsNullShouldThrowException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.IfFeedBuilderIsNullShouldThrowException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.IfFeedFillsExactlyToQuotaShouldNotBeArchived" executed="True" success="True" time="0.016" asserts="3" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.IfFileSystemIsNullShouldThrowException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.IfTimerIsNullShouldThrowException" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.ShouldRaiseEventEachTimeATempFileIsSavedToCurrentDirectory" executed="True" success="True" time="0.016" asserts="6" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.WhenNumberOfEventsExceedsQuotaShouldArchiveFeedAndBeginAnotherOne" executed="True" success="True" time="0.000" asserts="7" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.WhenThereAreNoOutstandingEventsShouldNotWriteFeedOrRaiseEvent" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.WhenThereAreNoOutstandingEventsShouldRetainTheCurrentTempFileName" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.WhenTriggeredRepeatedlyShouldContinueToAddEventsToExistingFeed" executed="True" success="True" time="0.000" asserts="4" />
+ <test-case name="ProductCatalog.Tests.Writer.FeedWriterTests.WhenTriggeredShouldAddBatchOfEventsToCurrentFeed" executed="True" success="True" time="0.016" asserts="2" />
+ </results>
+ </test-suite>
+ <test-suite name="Model" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-suite name="EventBufferTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Model.EventBufferTests.CanAddAndTakeEvent" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Model.EventBufferTests.IfThereAreNoEventsInBufferShouldReturnZeroEvents" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Model.EventBufferTests.WhenNumberOfEventsInBufferExceedsBatchSizeShouldReturnBatchfulOfEvents" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Model.EventBufferTests.WhenNumberOfEventsInBufferIsLessThanBatchSizeShouldReturnAllEventsInRepositoryOldestFirst" executed="True" success="True" time="0.000" asserts="3" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="Persistence" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-suite name="FileNameTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Persistence.FileNameTests.ShouldAddAtomExtensionToValueWithoutExtension" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Persistence.FileNameTests.ShouldBeAbleToCloneSelf" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Persistence.FileNameTests.ShouldBeAbleToCreateTempFileName" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Persistence.FileNameTests.ShouldCreateXmlReader" executed="True" success="True" time="0.016" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Persistence.FileNameTests.ShouldCreateXmlWriter" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Persistence.FileNameTests.ShouldExhibitValueTypeEquality" executed="True" success="True" time="0.000" asserts="9" />
+ <test-case name="ProductCatalog.Tests.Writer.Persistence.FileNameTests.ShouldPreserveExistingAtomExtension" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Persistence.FileNameTests.ShouldThrowExceptionIfSuppliedValueHasDifferentExtension" executed="True" success="True" time="0.000" asserts="0" />
+ <test-case name="ProductCatalog.Tests.Writer.Persistence.FileNameTests.ToStringShouldReturnStringValueOfFileName" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ <test-suite name="Tasks" executed="True" success="True" time="0.047" asserts="0">
+ <results>
+ <test-suite name="ArchivingRecentEventsFeedTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.ArchivingRecentEventsFeedTests.IsNotTerminalState" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.ArchivingRecentEventsFeedTests.ShouldSaveArchivedVersionOfRecentEventsFeedToArchiveDirectory" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.ArchivingRecentEventsFeedTests.ShouldTransitionToUpdatingRecentEventsFeedWithNewRecentEventsFeed" executed="True" success="True" time="0.000" asserts="3" />
+ </results>
+ </test-suite>
+ <test-suite name="CreatingNewRecentEventsFeedTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.CreatingNewRecentEventsFeedTests.IsNotTerminalState" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.CreatingNewRecentEventsFeedTests.ShouldTransitionToUpdatingRecentEventsFeed" executed="True" success="True" time="0.000" asserts="3" />
+ </results>
+ </test-suite>
+ <test-suite name="IdentifyingRecentEventsFeedTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.IdentifyingRecentEventsFeedTests.IfRecentEventsFeedDoesNotExistOnFileSystemTransitionsToCreatingNewRecentEventsFeed" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.IdentifyingRecentEventsFeedTests.IfRecentEventsFeedExistsOnFileSystemTransitionsToUpdatingRecentEventsFeed" executed="True" success="True" time="0.000" asserts="3" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.IdentifyingRecentEventsFeedTests.IsNotTerminalState" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="NotifyingListenersTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.NotifyingListenersTests.IsNotTerminalState" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.NotifyingListenersTests.ShouldNotifyListeners" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.NotifyingListenersTests.ShouldTransitionToTerminating" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="QueryingEventsTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.QueryingEventsTests.IfBufferContainsEventsShouldTransitionToIdentifyingCurrentFeed" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.QueryingEventsTests.IfBufferIsEmptyShouldTransitionToTerminate" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.QueryingEventsTests.IsNotTerminalState" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="RequeryingEventsTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.RequeryingEventsTests.IsNotTerminalState" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.RequeryingEventsTests.WhenBufferIsEmptyShouldTransitionToSavingCurrentFeed" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.RequeryingEventsTests.WhenBufferReturnsSomeEventsShouldTransitionToUpdatingCurrentFeed" executed="True" success="True" time="0.000" asserts="3" />
+ </results>
+ </test-suite>
+ <test-suite name="SavingRecentEventsFeedTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.SavingRecentEventsFeedTests.IsNotTerminalState" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.SavingRecentEventsFeedTests.ShouldSaveRecentEventsFeedToCurrentDirectory" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.SavingRecentEventsFeedTests.ShouldTransitionToNotifyingListeners" executed="True" success="True" time="0.000" asserts="2" />
+ </results>
+ </test-suite>
+ <test-suite name="TerminateTests" executed="True" success="True" time="0.000" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.TerminateTests.IsTerminalState" executed="True" success="True" time="0.000" asserts="1" />
+ </results>
+ </test-suite>
+ <test-suite name="UpdatingRecentEventsFeedTests" executed="True" success="True" time="0.016" asserts="0">
+ <results>
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.UpdatingRecentEventsFeedTests.IsNotTerminalState" executed="True" success="True" time="0.000" asserts="1" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.UpdatingRecentEventsFeedTests.WhenListOfEventsIsEmptyShouldTransitionToRequeryingEvents" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.UpdatingRecentEventsFeedTests.WhenRecentEventsFeedHasReachedQuotaAndThereAreNoRemainingEventsShouldTransitionToRequeryingEvents" executed="True" success="True" time="0.000" asserts="2" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.UpdatingRecentEventsFeedTests.WhenRecentEventsFeedHasReachedQuotaShouldTransitionToArchivingRecentEventsFeedWithRemainingEvents" executed="True" success="True" time="0.016" asserts="5" />
+ <test-case name="ProductCatalog.Tests.Writer.Tasks.UpdatingRecentEventsFeedTests.WhileThereAreEventsInTheListOfEventsAndTheFeedIsUnderQuotaShouldContinueAddingEventsToFeed" executed="True" success="True" time="0.000" asserts="2" />
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+ </results>
+ </test-suite>
+</test-results>
View
2 go.bat
@@ -0,0 +1,2 @@
+@echo off
+.\tools\nant\NAnt.exe %*
View
56 go.build
@@ -0,0 +1,56 @@
+<project name="Build Restbcuks.ProductCatalog" default="build">
+
+ <property name="configuration" value="debug"/>
+ <property name="base.dir" value="${project::get-base-directory()}"/>
+ <property name="output.dir" value="${base.dir}/output"/>
+ <property name="logs.dir" value="${output.dir}/logs"/>
+ <property name="binaries.dir" value="${base.dir}/src/ProductCatalog.Host/bin/${configuration}"/>
+ <property name="tests.dir" value="${base.dir}/src/ProductCatalog.Tests/bin/${configuration}"/>
+ <property name="solution.file" value="Restbucks.ProductCatalog.sln"/>
+ <property name="unit.test.assembly" value="ProductCatalog.Tests.dll"/>
+
+
+ <target name="clean" description="Delete all previously compiled binaries.">
+ <delete dir="${output.dir}" />
+ </target>
+
+ <target name="create.output.directories" description="Create output directories.">
+ <mkdir dir="${output.dir}" />
+ <mkdir dir="${logs.dir}" />
+ </target>
+
+ <target name="build.solution" description="Build solution.">
+ <msbuild project="${solution.file}">
+ <arg value="/property:Configuration=${configuration}"/>
+ <arg value="/t:Rebuild"/>
+ <arg value="/verbosity:quiet"/>
+ </msbuild>
+ </target>
+
+ <target name="deploy" description="Deploy to output directory.">
+ <copy todir="${output.dir}">
+ <fileset basedir="${binaries.dir}">
+ <include name="**/*.dll" />
+ <include name="**/*.exe" />
+ <include name="**/*.exe.config" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="run.unit.tests" description="Run unit tests.">
+ <exec program="${base.dir}/tools/nunit/nunit-console.exe"
+ workingdir="${tests.dir}"
+ commandline="${unit.test.assembly} /xml:TestResults.xml /nologo"/>
+ </target>
+
+
+ <target name="start.application">
+ <exec program="run.bat" spawn="true"/>
+ </target>
+
+ <target name="build" description="Build application." depends="clean, create.output.directories, build.solution, run.unit.tests, deploy"/>
+
+
+ <target name="run" description="Build and run application." depends="build, start.application"/>
+
+</project>
View
BIN lib/Castle.Core.dll
Binary file not shown.
View
BIN lib/Castle.DynamicProxy2.dll
Binary file not shown.
View
BIN lib/Castle.MicroKernel.dll
Binary file not shown.
View
BIN lib/Castle.Windsor.dll
Binary file not shown.
View
BIN lib/Restbucks.Xml.dll
Binary file not shown.
View
BIN lib/log4net.dll
Binary file not shown.
View
2 run.bat
@@ -0,0 +1,2 @@
+@echo off
+start "ProductCatalog" output\ProductCatalog.Host.exe
View
43 src/ProductCatalog.Host/App.config
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+
+ <configSections>
+ <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
+ </configSections>
+
+ <log4net>
+
+ <appender name="TraceAppender" type="log4net.Appender.TraceAppender">
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date %-5level %message [%logger] [%thread] %newline" />
+ </layout>
+ </appender>
+
+ <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date %-5level %message [%logger] [%thread] %newline" />
+ </layout>
+ </appender>
+
+ <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
+ <file value=".\logs\Restbucks.ProductCatalog.log" />
+ <appendToFile value="true" />
+ <rollingStyle value="Size" />
+ <maxSizeRollBackups value="10" />
+ <maximumFileSize value="100KB" />
+ <staticLogFileName value="true" />
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date %-5level %message [%logger] [%thread] %newline" />
+ </layout>
+ <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
+ </appender>
+
+ <root>
+ <priority value="ALL" />
+ <appender-ref ref="ConsoleAppender" />
+ <appender-ref ref="RollingFileAppender" />
+ </root>
+
+ </log4net>
+
+</configuration>
View
12 src/ProductCatalog.Host/Model/Product.cs
@@ -0,0 +1,12 @@
+using System.Runtime.Serialization;
+
+namespace ProductCatalog.Host.Model
+{
+ [DataContract(Name = "product", Namespace = "http://schemas.restbucks.com/product")]
+ public class Product
+ {
+ [DataMember(Name = "name")] public string Name;
+ [DataMember(Name = "size")] public string Size;
+ [DataMember(Name = "price")] public double Price;
+ }
+}
View
11 src/ProductCatalog.Host/Model/ProductReference.cs
@@ -0,0 +1,11 @@
+using System.Runtime.Serialization;
+
+namespace ProductCatalog.Host.Model
+{
+ [DataContract(Name = "product", Namespace = "http://schemas.restbucks.com/promotion")]
+ public class ProductReference
+ {
+ [DataMember(Name = "type")] public const string Type = "application/vnd.restbucks+xml";
+ [DataMember(Name = "href")] public string Href;
+ }
+}
View
10 src/ProductCatalog.Host/Model/Promotion.cs
@@ -0,0 +1,10 @@
+using System.Runtime.Serialization;
+
+namespace ProductCatalog.Host.Model
+{
+ [DataContract(Name = "promotion", Namespace = "http://schemas.restbucks.com/promotion")]
+ public class Promotion
+ {
+ [DataMember(Name="product")] public ProductReference ProductReference;
+ }
+}
View
11 src/ProductCatalog.Host/Model/RegionReference.cs
@@ -0,0 +1,11 @@
+using System.Runtime.Serialization;
+
+namespace ProductCatalog.Host.Model
+{
+ [DataContract(Name = "region", Namespace = "http://schemas.restbucks.com/promotion")]
+ public class RegionReference
+ {
+ [DataMember(Name = "type")] public const string Type = "application/vnd.restbucks+xml";
+ [DataMember(Name = "href")] public string Href;
+ }
+}
View
107 src/ProductCatalog.Host/ProductCatalog.Host.csproj
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{9E1FD220-0216-41DC-AE25-DB5A5079AF06}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>ProductCatalog.Host</RootNamespace>
+ <AssemblyName>ProductCatalog.Host</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Castle.Core, Version=1.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\Castle.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.DynamicProxy2, Version=2.1.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\Castle.DynamicProxy2.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.MicroKernel, Version=2.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\Castle.MicroKernel.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.Windsor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\Castle.Windsor.dll</HintPath>
+ </Reference>
+ <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\lib\log4net.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Runtime.Serialization">
+ <RequiredTargetFramework>3.0</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.ServiceModel.Web">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Model\Product.cs" />
+ <Compile Include="Model\ProductReference.cs" />
+ <Compile Include="Model\Promotion.cs" />
+ <Compile Include="Model\RegionReference.cs" />
+ <Compile Include="Program.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Setup\Container.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\ProductCatalog.Notifications\ProductCatalog.Notifications.csproj">
+ <Project>{4A73DF42-641F-4BDE-ACE1-164594A5425D}</Project>
+ <Name>ProductCatalog.Notifications</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\ProductCatalog.Shared\ProductCatalog.Shared.csproj">
+ <Project>{C502815C-5419-42FE-9A45-625370057CC8}</Project>
+ <Name>ProductCatalog.Shared</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\ProductCatalog.Writer\ProductCatalog.Writer.csproj">
+ <Project>{E09B0A4A-E0D0-4A26-9FAF-CF5F80F5B6C1}</Project>
+ <Name>ProductCatalog.Writer</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="App.config" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
View
71 src/ProductCatalog.Host/Program.cs
@@ -0,0 +1,71 @@
+using System;
+using System.Reflection;
+using log4net;
+using log4net.Config;
+using ProductCatalog.Host.Model;
+using ProductCatalog.Host.Setup;
+using ProductCatalog.Shared;
+using ProductCatalog.Writer;
+using ProductCatalog.Writer.Model;
+
+namespace ProductCatalog.Host
+{
+ internal class Program
+ {
+ private static readonly ILog Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+
+ private static void Main(string[] args)
+ {
+ XmlConfigurator.Configure();
+
+ UriConfiguration uriConfiguration = new UriConfiguration(
+ new Uri("http://localhost/product-catalog/notifications/"),
+ new UriTemplate("/recent"),
+ new UriTemplate("/?page={id}"),
+ new UriTemplate("/notification/{id}"));
+
+ FileSystemConfiguration fileSystemConfiguration = new FileSystemConfiguration(@"c:\");
+
+ Container container = new Container(uriConfiguration, fileSystemConfiguration);
+ container.Timer.Start();
+
+ ITimer publishTimer = StartPublishingTo(container.EventBuffer);
+
+
+ try
+ {
+ Console.WriteLine("Starting server...");
+ container.ServiceHost.StartHost();
+ Console.WriteLine("Server started. Press any key to terminate.");
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(ex);
+ }
+ finally
+ {
+ Console.ReadKey();
+
+ publishTimer.Stop();
+ publishTimer.Dispose();
+
+ container.Dispose();
+ }
+ }
+
+ private static ITimer StartPublishingTo(EventBuffer eventBuffer)
+ {
+ ITimer publishTimer = new ScheduledTimer(2000);
+ int id = 0;
+
+ publishTimer.TimerFired += ((o, a) =>
+ {
+ publishTimer.Stop();
+ eventBuffer.Add(new Event(id++, "event: " + id, DateTime.Now, new EventBody("application/vnd.restbucks+xml", new Uri("http://product/" + id), new Product {Name = "product", Price = 10.0, Size = "1kg"})));
+ publishTimer.Start();
+ });
+ publishTimer.Start();
+ return publishTimer;
+ }
+ }
+}
View
36 src/ProductCatalog.Host/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ProductCatalog.Host")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("ProductCatalog.Host")]
+[assembly: AssemblyCopyright("Copyright © 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("1ee683ed-c6ad-46d9-ab14-c5264794bbb8")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
View
85 src/ProductCatalog.Host/Setup/Container.cs
@@ -0,0 +1,85 @@
+using Castle.MicroKernel.Registration;
+using Castle.Windsor;
+using ProductCatalog.Notifications;
+using ProductCatalog.Notifications.Model;
+using ProductCatalog.Notifications.Persistence;
+using ProductCatalog.Notifications.Service;
+using ProductCatalog.Shared;
+using ProductCatalog.Writer;
+using ProductCatalog.Writer.Feeds;
+using ProductCatalog.Writer.Model;
+using ProductCatalog.Writer.Persistence;
+
+namespace ProductCatalog.Host.Setup
+{
+ public class Container
+ {
+ private readonly IWindsorContainer container;
+
+ public Container(UriConfiguration uriConfiguration, FileSystemConfiguration fileSystemConfiguration)
+ {
+ container = new WindsorContainer();
+
+ AddConfiguration(uriConfiguration, fileSystemConfiguration);
+ AddCommonComponents();
+ AddNotificationsServiceComponents();
+ AddWriterComponents();
+ WireUpEvents();
+ }
+
+ public ServiceHost ServiceHost
+ {
+ get { return container.Resolve<ServiceHost>(); }
+ }
+
+ public ITimer Timer
+ {
+ get { return container.Resolve<ITimer>(); }
+ }
+
+ public EventBuffer EventBuffer
+ {
+ get { return container.Resolve<EventBuffer>(); }
+ }
+
+ private void AddConfiguration(UriConfiguration uriConfiguration, FileSystemConfiguration fileSystemConfiguration)
+ {
+ container.Register(Component.For(typeof (UriConfiguration)).Instance(uriConfiguration).LifeStyle.Singleton);
+ container.Register(Component.For(typeof (FileSystemConfiguration)).Instance(fileSystemConfiguration).LifeStyle.Singleton);
+ }
+
+ private void AddCommonComponents()
+ {
+ container.Register(Component.For(typeof (Links)).LifeStyle.Singleton);
+ }
+
+ private void AddNotificationsServiceComponents()
+ {
+ container.Register(Component.For(typeof (ResourceIdToStoreIdConverter)).Instance(ResourceIdToStoreIdConverter.Default).LifeStyle.Singleton);
+ container.Register(Component.For(typeof (IRepository)).ImplementedBy(typeof (Repository)).LifeStyle.Singleton);
+ container.Register(Component.For(typeof (IStore)).ImplementedBy(typeof (FileStore)));
+ container.Register(Component.For(typeof (Routes)));
+ container.Register(Component.For(typeof (NotificationsService)));
+ container.Register(Component.For(typeof (ServiceHost)).LifeStyle.Singleton);
+ }
+
+ private void AddWriterComponents()
+ {
+ container.Register(Component.For(typeof (ITimer)).Instance(new ScheduledTimer(10000)).LifeStyle.Singleton);
+ container.Register(Component.For(typeof (EventBuffer)).LifeStyle.Singleton);
+ container.Register(Component.For(typeof (FeedWriter)).LifeStyle.Singleton);
+ container.Register(Component.For(typeof (FeedBuilder)).LifeStyle.Singleton);
+ container.Register(Component.For(typeof (IFileSystem)).ImplementedBy(typeof (FileSystem)));
+ }
+
+ private void WireUpEvents()
+ {
+ container.Resolve<FeedWriter>().FeedMappingsChanged += ((Repository) container.Resolve<IRepository>()).OnFeedMappingsChanged;
+ }
+
+ public void Dispose()
+ {
+ container.Dispose();
+ }
+ }
+}
View
37 src/ProductCatalog.Host/bin/Debug/logs/Restbucks.ProductCatalog.log
@@ -0,0 +1,37 @@
+2011-03-09 19:39:23,547 DEBUG Directory exists: [c:\productcatalog]. [ProductCatalog.Shared.FileSystemConfiguration] [3976]
+2011-03-09 19:39:23,578 DEBUG Directory exists: [c:\productcatalog\archive]. [ProductCatalog.Shared.FileSystemConfiguration] [3976]
+2011-03-09 19:39:23,594 DEBUG Directory exists: [c:\productcatalog\entries]. [ProductCatalog.Shared.FileSystemConfiguration] [3976]
+2011-03-09 19:39:23,719 INFO Service initialized. Repository: [ProductCatalog.Notifications.Model.Repository]. [ProductCatalog.Notifications.NotificationsService] [3976]
+2011-03-09 19:39:23,734 DEBUG Starting host... [ProductCatalog.Notifications.Service.ServiceHost] [3976]
+2011-03-09 19:39:23,750 DEBUG Base uri: [http://localhost/product-catalog/notifications/]. [ProductCatalog.Notifications.Service.ServiceHost] [3608]
+2011-03-09 19:39:31,609 DEBUG Disposing ScheduledTimer... [ProductCatalog.Writer.ScheduledTimer] [3976]
+2011-03-09 19:39:31,625 DEBUG Disposing FeedWriter... [ProductCatalog.Writer.FeedWriter] [3976]
+2011-03-09 19:39:31,656 DEBUG Disposing ServiceHost... [ProductCatalog.Notifications.Service.ServiceHost] [3976]
+2011-03-09 19:39:31,672 WARN Shutting down... [ProductCatalog.Notifications.Service.ServiceHost] [3608]
+2011-03-09 19:40:00,063 DEBUG Directory exists: [c:\productcatalog]. [ProductCatalog.Shared.FileSystemConfiguration] [3308]
+2011-03-09 19:40:00,110 DEBUG Directory exists: [c:\productcatalog\archive]. [ProductCatalog.Shared.FileSystemConfiguration] [3308]
+2011-03-09 19:40:00,188 DEBUG Directory exists: [c:\productcatalog\entries]. [ProductCatalog.Shared.FileSystemConfiguration] [3308]
+2011-03-09 19:40:00,360 INFO Service initialized. Repository: [ProductCatalog.Notifications.Model.Repository]. [ProductCatalog.Notifications.NotificationsService] [3308]
+2011-03-09 19:40:00,376 DEBUG Starting host... [ProductCatalog.Notifications.Service.ServiceHost] [3308]
+2011-03-09 19:40:00,407 DEBUG Base uri: [http://localhost/product-catalog/notifications/]. [ProductCatalog.Notifications.Service.ServiceHost] [288]
+2011-03-09 19:40:10,360 DEBUG Started feed writing. [ProductCatalog.Writer.Tasks.QueryingEvents] [1592]
+2011-03-09 19:40:10,423 DEBUG Querying events. Number of events found: [4]. [ProductCatalog.Writer.Tasks.QueryingEvents] [1592]
+2011-03-09 19:40:10,423 DEBUG Identifying recent events feed. [ProductCatalog.Writer.Tasks.IdentifyingRecentEventsFeed] [1592]
+2011-03-09 19:40:10,876 DEBUG Found recent events feed. Current feed. Id: [3]. FileName: [6de2d77c-97a2-465d-a6b7-c3b5b6495420.atom]. Number of entries: [6]. [ProductCatalog.Writer.Tasks.IdentifyingRecentEventsFeed] [1592]
+2011-03-09 19:40:10,891 DEBUG Updating recent events feed. Current feed. Id: [3]. FileName: [6de2d77c-97a2-465d-a6b7-c3b5b6495420.atom]. Number of entries: [6]. [ProductCatalog.Writer.Tasks.UpdatingRecentEventsFeed] [1592]
+2011-03-09 19:40:10,938 DEBUG Requerying events. Number of events found: [0]. [ProductCatalog.Writer.Tasks.RequeryingEvents] [1592]
+2011-03-09 19:40:10,954 DEBUG Saving recent events feed. Current feed. Id: [3]. FileName: [6de2d77c-97a2-465d-a6b7-c3b5b6495420.atom]. Number of entries: [10]. [ProductCatalog.Writer.Tasks.SavingRecentEventsFeed] [1592]
+2011-03-09 19:40:11,079 DEBUG Notifying listeners. [ProductCatalog.Writer.Tasks.NotifyingListeners] [1592]
+2011-03-09 19:40:11,095 DEBUG Cleaning up current directory. [ProductCatalog.Writer.Persistence.Reaper] [1592]
+2011-03-09 19:40:11,110 DEBUG Start deleting files. Directory: [c:\productcatalog]. [ProductCatalog.Writer.Persistence.Directory] [1592]
+2011-03-09 19:40:11,173 DEBUG Deleting file. FileName: [2a752729-1d80-419f-9631-916d65f58d77.atom]. [ProductCatalog.Writer.Persistence.Directory] [1592]
+2011-03-09 19:40:11,188 DEBUG Deleting file. FileName: [4b58b9f0-7902-4413-9c01-b9cd933232a6.atom]. [ProductCatalog.Writer.Persistence.Directory] [1592]
+2011-03-09 19:40:11,188 DEBUG Deleting file. FileName: [a7a10e55-279f-4abe-89fd-a553f47323d1.atom]. [ProductCatalog.Writer.Persistence.Directory] [1592]
+2011-03-09 19:40:11,204 DEBUG Deleting file. FileName: [e2526ed8-a101-4084-8276-fce18d4c20b6.atom]. [ProductCatalog.Writer.Persistence.Directory] [1592]
+2011-03-09 19:40:11,235 DEBUG Deleting file. FileName: [fc1adf17-ee83-4fba-a7bb-c79e96dd0387.atom]. [ProductCatalog.Writer.Persistence.Directory] [1592]
+2011-03-09 19:40:11,235 DEBUG End deleting files. [ProductCatalog.Writer.Persistence.Directory] [1592]
+2011-03-09 19:40:11,235 DEBUG FeedMappingsChanged event. ResourceId: [3]. StoreId: [6de2d77c-97a2-465d-a6b7-c3b5b6495420.atom]. [ProductCatalog.Notifications.Model.Repository] [1592]
+2011-03-09 19:40:11,251 DEBUG Finished feed writing. [ProductCatalog.Writer.Tasks.Terminate] [1592]
+2011-03-09 19:40:15,235 DEBUG Disposing ScheduledTimer... [ProductCatalog.Writer.ScheduledTimer] [3308]
+2011-03-09 19:40:15,313 DEBUG Disposing FeedWriter... [ProductCatalog.Writer.FeedWriter] [3308]
+2011-03-09 19:40:15,329 DEBUG Disposing ServiceHost... [ProductCatalog.Notifications.Service.ServiceHost] [3308]
View
20 src/ProductCatalog.Notifications/Http/CacheControl.cs
@@ -0,0 +1,20 @@
+namespace ProductCatalog.Notifications.Http
+{
+ public class CacheControl : IHeader
+ {
+ public static CacheControl LongCachingPolicy = new CacheControl("max-age=10000");
+ public static CacheControl ShortCachingPolicy = new CacheControl("max-age=10");
+
+ private readonly string value;
+
+ private CacheControl(string value)
+ {
+ this.value = value;
+ }
+
+ public void AddToResponse(IResponseWrapper response)
+ {
+ response.WriteCacheControl(value);
+ }
+ }
+}
View
19 src/ProductCatalog.Notifications/Http/ContentType.cs
@@ -0,0 +1,19 @@
+namespace ProductCatalog.Notifications.Http
+{
+ public class ContentType : IHeader
+ {
+ public static readonly ContentType Atom = new ContentType("application/atom+xml");
+
+ private readonly string value;
+
+ private ContentType(string value)
+ {
+ this.value = value;
+ }
+
+ public void AddToResponse(IResponseWrapper response)
+ {
+ response.WriteContentType(value);
+ }
+ }
+}
View
37 src/ProductCatalog.Notifications/Http/ETag.cs
@@ -0,0 +1,37 @@
+namespace ProductCatalog.Notifications.Http
+{
+ public class ETag : IHeader
+ {
+ private readonly string value;
+
+ public ETag(string value)
+ {
+ this.value = value;
+ }
+
+ public void AddToResponse(IResponseWrapper response)
+ {
+ response.WriteETag(value);
+ }
+
+ public bool Equals(ETag other)
+ {
+ if (ReferenceEquals(null, other)) return false;
+ if (ReferenceEquals(this, other)) return true;
+ return Equals(other.value, value);
+ }
+
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ if (ReferenceEquals(this, obj)) return true;
+ if (obj.GetType() != typeof (ETag)) return false;
+ return Equals((ETag) obj);
+ }
+
+ public override int GetHashCode()
+ {
+ return (value != null ? value.GetHashCode() : 0);
+ }
+ }
+}
View
21 src/ProductCatalog.Notifications/Http/HeaderQuery.cs
@@ -0,0 +1,21 @@
+using ProductCatalog.Notifications.Model;
+
+namespace ProductCatalog.Notifications.Http
+{
+ public class HeaderQuery
+ {
+ private readonly IHeader header;
+
+ public HeaderQuery(IHeader header)
+ {
+ this.header = header;
+ }
+
+ public bool Matches(IRepresentation representation)
+ {
+ IResponseContext context = new ResponseContext();
+ representation.UpdateContext(context);
+ return context.ContainsHeader(header);
+ }
+ }
+}
View
7 src/ProductCatalog.Notifications/Http/IChunkingStrategy.cs
@@ -0,0 +1,7 @@
+namespace ProductCatalog.Notifications.Http
+{
+ public interface IChunkingStrategy
+ {
+ IHeader CreateHeader(long contentLength);
+ }
+}
View
9 src/ProductCatalog.Notifications/Http/ICondition.cs
@@ -0,0 +1,9 @@
+using ProductCatalog.Notifications.Model;
+
+namespace ProductCatalog.Notifications.Http
+{
+ public interface ICondition
+ {
+ IResponse CreateResponse(IRepresentation representation);
+ }
+}
View
7 src/ProductCatalog.Notifications/Http/IHeader.cs
@@ -0,0 +1,7 @@
+namespace ProductCatalog.Notifications.Http
+{
+ public interface IHeader
+ {
+ void AddToResponse(IResponseWrapper response);
+ }
+}
View
10 src/ProductCatalog.Notifications/Http/IRequestWrapper.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace ProductCatalog.Notifications.Http
+{
+ public interface IRequestWrapper
+ {
+ ICondition Condition { get; }
+ Uri Uri { get; }
+ }
+}
View
7 src/ProductCatalog.Notifications/Http/IResponse.cs
@@ -0,0 +1,7 @@
+namespace ProductCatalog.Notifications.Http
+{
+ public interface IResponse
+ {
+ void ApplyTo(IResponseWrapper responseWrapper);
+ }
+}
View
14 src/ProductCatalog.Notifications/Http/IResponseContext.cs
@@ -0,0 +1,14 @@
+using System;
+using System.IO;
+using ProductCatalog.Notifications.Model;
+
+namespace ProductCatalog.Notifications.Http
+{