Permalink
Browse files

Source added

  • Loading branch information...
0 parents commit 1e8d6d57c78a2939f2e1c87e499f9a1a41a93a15 @andrewperk andrewperk committed Oct 9, 2013
Showing with 72,440 additions and 0 deletions.
  1. +62 −0 .gitattributes
  2. +23 −0 .gitignore
  3. +3 −0 README.md
  4. +21 −0 license.txt
  5. +21 −0 seleno-license.txt
  6. BIN src/.nuget/NuGet.exe
  7. +133 −0 src/.nuget/NuGet.targets
  8. +33 −0 src/MaintainableUiTesting.sln
  9. +54 −0 src/MvcMusicStore.FunctionalTests/BrittleTest.cs
  10. +11 −0 src/MvcMusicStore.FunctionalTests/Framework/Host.cs
  11. +54 −0 src/MvcMusicStore.FunctionalTests/Framework/IisExpressWebServer.cs
  12. +37 −0 src/MvcMusicStore.FunctionalTests/Framework/Page.cs
  13. +68 −0 src/MvcMusicStore.FunctionalTests/Framework/Page`1.cs
  14. +60 −0 src/MvcMusicStore.FunctionalTests/Framework/ProjectLocation.cs
  15. +32 −0 src/MvcMusicStore.FunctionalTests/Framework/SeleniumRunner.cs
  16. +33 −0 src/MvcMusicStore.FunctionalTests/Framework/WebApplication.cs
  17. +102 −0 src/MvcMusicStore.FunctionalTests/MvcMusicStore.FunctionalTests.csproj
  18. +41 −0 src/MvcMusicStore.FunctionalTests/PageObjectTest.cs
  19. +24 −0 src/MvcMusicStore.FunctionalTests/PageObjects/AddressAndPaymentPage.cs
  20. +14 −0 src/MvcMusicStore.FunctionalTests/PageObjects/AlbumBrowsePage.cs
  21. +13 −0 src/MvcMusicStore.FunctionalTests/PageObjects/AlbumDetailPage.cs
  22. +25 −0 src/MvcMusicStore.FunctionalTests/PageObjects/HomePage.cs
  23. +13 −0 src/MvcMusicStore.FunctionalTests/PageObjects/LogonPage.cs
  24. +18 −0 src/MvcMusicStore.FunctionalTests/PageObjects/RegisterPage.cs
  25. +13 −0 src/MvcMusicStore.FunctionalTests/PageObjects/ShoppingCartPage.cs
  26. +36 −0 src/MvcMusicStore.FunctionalTests/Properties/AssemblyInfo.cs
  27. +59 −0 src/MvcMusicStore.FunctionalTests/StronglyTypedPageObjectTest.cs
  28. +16 −0 src/MvcMusicStore.FunctionalTests/StronglyTypedPageObjects/AddressAndPaymentPage.cs
  29. +14 −0 src/MvcMusicStore.FunctionalTests/StronglyTypedPageObjects/AlbumBrowsePage.cs
  30. +13 −0 src/MvcMusicStore.FunctionalTests/StronglyTypedPageObjects/AlbumDetailPage.cs
  31. +25 −0 src/MvcMusicStore.FunctionalTests/StronglyTypedPageObjects/HomePage.cs
  32. +13 −0 src/MvcMusicStore.FunctionalTests/StronglyTypedPageObjects/LogonPage.cs
  33. +15 −0 src/MvcMusicStore.FunctionalTests/StronglyTypedPageObjects/RegisterPage.cs
  34. +13 −0 src/MvcMusicStore.FunctionalTests/StronglyTypedPageObjects/ShoppingCartPage.cs
  35. +5 −0 src/MvcMusicStore.FunctionalTests/packages.config
  36. +2,168 −0 src/MvcMusicStore/App_Code/SqlCeMembershipProvider.cs
  37. +297 −0 src/MvcMusicStore/App_Code/SqlCeMembershipUtils.cs
  38. +782 −0 src/MvcMusicStore/App_Code/SqlCeProfileProvider.cs
  39. +813 −0 src/MvcMusicStore/App_Code/SqlCeRoleProvider.cs
  40. BIN src/MvcMusicStore/Content/Images/home-showcase.png
  41. BIN src/MvcMusicStore/Content/Images/logo.png
  42. BIN src/MvcMusicStore/Content/Images/placeholder.gif
  43. +327 −0 src/MvcMusicStore/Content/Site.css
  44. BIN src/MvcMusicStore/Content/themes/base/images/animated-overlay.gif
  45. BIN src/MvcMusicStore/Content/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png
  46. BIN src/MvcMusicStore/Content/themes/base/images/ui-bg_flat_75_ffffff_40x100.png
  47. BIN src/MvcMusicStore/Content/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png
  48. BIN src/MvcMusicStore/Content/themes/base/images/ui-bg_glass_65_ffffff_1x400.png
  49. BIN src/MvcMusicStore/Content/themes/base/images/ui-bg_glass_75_dadada_1x400.png
  50. BIN src/MvcMusicStore/Content/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png
  51. BIN src/MvcMusicStore/Content/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png
  52. BIN src/MvcMusicStore/Content/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  53. BIN src/MvcMusicStore/Content/themes/base/images/ui-icons_222222_256x240.png
  54. BIN src/MvcMusicStore/Content/themes/base/images/ui-icons_2e83ff_256x240.png
  55. BIN src/MvcMusicStore/Content/themes/base/images/ui-icons_454545_256x240.png
  56. BIN src/MvcMusicStore/Content/themes/base/images/ui-icons_888888_256x240.png
  57. BIN src/MvcMusicStore/Content/themes/base/images/ui-icons_cd0a0a_256x240.png
  58. +1,188 −0 src/MvcMusicStore/Content/themes/base/jquery-ui.css
  59. +38 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.accordion.css
  60. +12 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.all.css
  61. +16 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.autocomplete.css
  62. +25 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.base.css
  63. +114 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.button.css
  64. +93 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.core.css
  65. +178 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.datepicker.css
  66. +69 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.dialog.css
  67. +79 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.menu.css
  68. +28 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.progressbar.css
  69. +78 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.resizable.css
  70. +15 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.selectable.css
  71. +73 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.slider.css
  72. +65 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.spinner.css
  73. +52 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.tabs.css
  74. +406 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.theme.css
  75. +19 −0 src/MvcMusicStore/Content/themes/base/jquery.ui.tooltip.css
  76. BIN src/MvcMusicStore/Content/themes/base/minified/images/animated-overlay.gif
  77. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-bg_flat_0_aaaaaa_40x100.png
  78. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-bg_flat_75_ffffff_40x100.png
  79. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-bg_glass_55_fbf9ee_1x400.png
  80. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-bg_glass_65_ffffff_1x400.png
  81. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-bg_glass_75_dadada_1x400.png
  82. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-bg_glass_75_e6e6e6_1x400.png
  83. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-bg_glass_95_fef1ec_1x400.png
  84. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  85. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-icons_222222_256x240.png
  86. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-icons_2e83ff_256x240.png
  87. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-icons_454545_256x240.png
  88. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-icons_888888_256x240.png
  89. BIN src/MvcMusicStore/Content/themes/base/minified/images/ui-icons_cd0a0a_256x240.png
  90. +4 −0 src/MvcMusicStore/Content/themes/base/minified/jquery-ui.min.css
  91. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.accordion.min.css
  92. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.autocomplete.min.css
  93. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.button.min.css
  94. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.core.min.css
  95. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.datepicker.min.css
  96. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.dialog.min.css
  97. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.menu.min.css
  98. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.progressbar.min.css
  99. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.resizable.min.css
  100. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.selectable.min.css
  101. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.slider.min.css
  102. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.spinner.min.css
  103. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.tabs.min.css
  104. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.theme.min.css
  105. +5 −0 src/MvcMusicStore/Content/themes/base/minified/jquery.ui.tooltip.min.css
  106. +141 −0 src/MvcMusicStore/Controllers/AccountController.cs
  107. +83 −0 src/MvcMusicStore/Controllers/CheckoutController.cs
  108. +34 −0 src/MvcMusicStore/Controllers/HomeController.cs
  109. +92 −0 src/MvcMusicStore/Controllers/ShoppingCartController.cs
  110. +55 −0 src/MvcMusicStore/Controllers/StoreController.cs
  111. +118 −0 src/MvcMusicStore/Controllers/StoreManagerController.cs
  112. +1 −0 src/MvcMusicStore/Global.asax
  113. +42 −0 src/MvcMusicStore/Global.asax.cs
  114. +63 −0 src/MvcMusicStore/Models/AccountModels.cs
  115. +37 −0 src/MvcMusicStore/Models/Album.cs
  116. +8 −0 src/MvcMusicStore/Models/Artist.cs
  117. +16 −0 src/MvcMusicStore/Models/Cart.cs
  118. +12 −0 src/MvcMusicStore/Models/Genre.cs
  119. +15 −0 src/MvcMusicStore/Models/MusicStoreEntities.cs
  120. +67 −0 src/MvcMusicStore/Models/Order.cs
  121. +14 −0 src/MvcMusicStore/Models/OrderDetail.cs
  122. +431 −0 src/MvcMusicStore/Models/SampleData.cs
  123. +200 −0 src/MvcMusicStore/Models/ShoppingCart.cs
  124. +10 −0 src/MvcMusicStore/Models/User.cs
  125. +305 −0 src/MvcMusicStore/MvcMusicStore.csproj
  126. +35 −0 src/MvcMusicStore/Properties/AssemblyInfo.cs
  127. +1 −0 src/MvcMusicStore/README.jQuery.vsdoc.txt
  128. +7,117 −0 src/MvcMusicStore/Scripts/MicrosoftAjax.debug.js
  129. +6 −0 src/MvcMusicStore/Scripts/MicrosoftAjax.js
  130. +408 −0 src/MvcMusicStore/Scripts/MicrosoftMvcAjax.debug.js
  131. +25 −0 src/MvcMusicStore/Scripts/MicrosoftMvcAjax.js
  132. +883 −0 src/MvcMusicStore/Scripts/MicrosoftMvcValidation.debug.js
  133. +55 −0 src/MvcMusicStore/Scripts/MicrosoftMvcValidation.js
  134. +9,404 −0 src/MvcMusicStore/Scripts/jquery-1.7.2.js
  135. +4 −0 src/MvcMusicStore/Scripts/jquery-1.7.2.min.js
  136. +2,670 −0 src/MvcMusicStore/Scripts/jquery-2.0.2.intellisense.js
  137. +8,842 −0 src/MvcMusicStore/Scripts/jquery-2.0.2.js
  138. +6 −0 src/MvcMusicStore/Scripts/jquery-2.0.2.min.js
  139. +1 −0 src/MvcMusicStore/Scripts/jquery-2.0.2.min.map
  140. +15,003 −0 src/MvcMusicStore/Scripts/jquery-ui-1.10.3.js
  141. +12 −0 src/MvcMusicStore/Scripts/jquery-ui-1.10.3.min.js
  142. +11,464 −0 src/MvcMusicStore/Scripts/jquery-ui-1.8.20.js
  143. +5 −0 src/MvcMusicStore/Scripts/jquery-ui-1.8.20.min.js
  144. +165 −0 src/MvcMusicStore/Scripts/jquery.unobtrusive-ajax.js
  145. +5 −0 src/MvcMusicStore/Scripts/jquery.unobtrusive-ajax.min.js
  146. +1,288 −0 src/MvcMusicStore/Scripts/jquery.validate-vsdoc.js
  147. +1,231 −0 src/MvcMusicStore/Scripts/jquery.validate.js
  148. +2 −0 src/MvcMusicStore/Scripts/jquery.validate.min.js
  149. +319 −0 src/MvcMusicStore/Scripts/jquery.validate.unobtrusive.js
  150. +5 −0 src/MvcMusicStore/Scripts/jquery.validate.unobtrusive.min.js
  151. +1,265 −0 src/MvcMusicStore/Scripts/modernizr-2.5.3.js
  152. +1,393 −0 src/MvcMusicStore/Scripts/modernizr-2.6.2.js
  153. +11 −0 src/MvcMusicStore/ViewModels/ShoppingCartRemoveViewModel.cs
  154. +11 −0 src/MvcMusicStore/ViewModels/ShoppingCartViewModel.cs
  155. +50 −0 src/MvcMusicStore/Views/Account/ChangePassword.cshtml
  156. +8 −0 src/MvcMusicStore/Views/Account/ChangePasswordSuccess.cshtml
  157. +48 −0 src/MvcMusicStore/Views/Account/LogOn.cshtml
  158. +58 −0 src/MvcMusicStore/Views/Account/Register.cshtml
  159. +31 −0 src/MvcMusicStore/Views/Checkout/AddressAndPayment.cshtml
  160. +13 −0 src/MvcMusicStore/Views/Checkout/Complete.cshtml
  161. +20 −0 src/MvcMusicStore/Views/Home/Index.cshtml
  162. +9 −0 src/MvcMusicStore/Views/Shared/Error.cshtml
  163. +31 −0 src/MvcMusicStore/Views/Shared/_Layout.cshtml
  164. +4 −0 src/MvcMusicStore/Views/ShoppingCart/CartSummary.cshtml
  165. +103 −0 src/MvcMusicStore/Views/ShoppingCart/Index.cshtml
  166. +21 −0 src/MvcMusicStore/Views/Store/Browse.cshtml
  167. +30 −0 src/MvcMusicStore/Views/Store/Details.cshtml
  168. +11 −0 src/MvcMusicStore/Views/Store/GenreMenu.cshtml
  169. +14 −0 src/MvcMusicStore/Views/Store/Index.cshtml
  170. +65 −0 src/MvcMusicStore/Views/StoreManager/Create.cshtml
  171. +21 −0 src/MvcMusicStore/Views/StoreManager/Delete.cshtml
  172. +40 −0 src/MvcMusicStore/Views/StoreManager/Details.cshtml
  173. +67 −0 src/MvcMusicStore/Views/StoreManager/Edit.cshtml
  174. +60 −0 src/MvcMusicStore/Views/StoreManager/Index.cshtml
  175. +58 −0 src/MvcMusicStore/Views/Web.config
  176. +3 −0 src/MvcMusicStore/Views/_ViewStart.cshtml
  177. +30 −0 src/MvcMusicStore/Web.Debug.config
  178. +31 −0 src/MvcMusicStore/Web.Release.config
  179. +93 −0 src/MvcMusicStore/Web.config
  180. +10 −0 src/MvcMusicStore/packages.config
@@ -0,0 +1,62 @@
+* text=auto
+
+# Custom for Visual Studio
+*.cs diff=csharp
+*.sln merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Normalise endings to CRLF
+*.cs eol=crlf
+*.xml eol=crlf
+*.xaml eol=crlf
+*.xsl eol=crlf
+*.xsd eol=crlf
+*.cshtml eol=crlf
+*.css eol=crlf
+*.js eol=crlf
+*.txt eol=crlf
+*.config eol=crlf
+*.sql eol=crlf
+*.sln eol=crlf
+*.csproj eol=crlf
+*.vbproj eol=crlf
+*.fsproj eol=crlf
+*.dbproj eol=crlf
+*.nunit eol=crlf
+*.html eol=crlf
+*.md eol=crlf
+*.proj eol=crlf
+*.bat eol=crlf
+*.cmd eol=crlf
+*.nuspec eol=crlf
+*.targets eol=crlf
+*.conf eol=crlf
+*.manifest eol=crlf
+*.ps1 eol=crlf
+*.resx eol=crlf
+*.asax eol=crlf
+*.aspx eol=crlf
+*.ncrunchproject eol=crlf
+*.ncrunchsolution eol=crlf
+*.msbuild eol=crlf
+*.template eol=crlf
+*.settings eol=crlf
+*.java eol=crlf
+.gitattributes eol=crlf
+.classpath eol=crlf
+.project eol=crlf
+
+# Standard to msysgit
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
@@ -0,0 +1,23 @@
+_ReSharper.*
+bin/
+obj/
+*.user
+*.suo
+*~
+*.swp
+*.orig
+*.nupkg
+*.crunchproject.local.xml
+*.crunchsolution.local.xml
+*.ncrunchsolution
+*.ncrunchproject
+*.cache
+src/packages/*
+PackageBuild/*
+Build/*
+*.mdf
+*.ldf
+*.sdf
+*.vsdoc
+TestResult.xml
+*.DotSettings
@@ -0,0 +1,3 @@
+# Maintainable Automated UI Tests Source Code
+
+Source code for the Nettuts+ article, "Maintainable Automated UI Tests" by Mehdi Khalili.
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2013 Mehdi Khalili
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2011-2013 TestStack.Seleno Contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Binary file not shown.
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
+
+ <!-- Enable the restore command to run before builds -->
+ <RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
+
+ <!-- Property that enables building a package from a project -->
+ <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
+
+ <!-- Determines if package restore consent is required to restore packages -->
+ <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
+
+ <!-- Download NuGet.exe if it does not already exist -->
+ <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
+ </PropertyGroup>
+
+ <ItemGroup Condition=" '$(PackageSources)' == '' ">
+ <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
+ <!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
+ <!--
+ <PackageSource Include="https://nuget.org/api/v2/" />
+ <PackageSource Include="https://my-nuget-source/nuget/" />
+ -->
+ </ItemGroup>
+
+ <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
+ <!-- Windows specific commands -->
+ <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
+ <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
+ <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
+ <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
+ <PackagesConfig>packages.config</PackagesConfig>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- NuGet command -->
+ <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
+ <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
+
+ <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
+ <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
+
+ <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
+
+ <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
+ <NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
+
+ <!-- Commands -->
+ <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir "$(SolutionDir) " </RestoreCommand>
+ <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties Configuration=$(Configuration) $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
+
+ <!-- We need to ensure packages are restored prior to assembly resolve -->
+ <BuildDependsOn Condition="$(RestorePackages) == 'true'">
+ RestorePackages;
+ $(BuildDependsOn);
+ </BuildDependsOn>
+
+ <!-- Make the build depend on restore packages -->
+ <BuildDependsOn Condition="$(BuildPackage) == 'true'">
+ $(BuildDependsOn);
+ BuildPackage;
+ </BuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="CheckPrerequisites">
+ <!-- Raise an error if we're unable to locate nuget.exe -->
+ <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
+ <!--
+ Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
+ This effectively acts as a lock that makes sure that the download operation will only happen once and all
+ parallel builds will have to wait for it to complete.
+ -->
+ <MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
+ </Target>
+
+ <Target Name="_DownloadNuGet">
+ <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
+ </Target>
+
+ <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(RestoreCommand)"
+ Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
+
+ <Exec Command="$(RestoreCommand)"
+ LogStandardErrorAsError="true"
+ Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
+ </Target>
+
+ <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(BuildCommand)"
+ Condition=" '$(OS)' != 'Windows_NT' " />
+
+ <Exec Command="$(BuildCommand)"
+ LogStandardErrorAsError="true"
+ Condition=" '$(OS)' == 'Windows_NT' " />
+ </Target>
+
+ <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <OutputFilename ParameterType="System.String" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Reference Include="System.Core" />
+ <Using Namespace="System" />
+ <Using Namespace="System.IO" />
+ <Using Namespace="System.Net" />
+ <Using Namespace="Microsoft.Build.Framework" />
+ <Using Namespace="Microsoft.Build.Utilities" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ try {
+ OutputFilename = Path.GetFullPath(OutputFilename);
+
+ Log.LogMessage("Downloading latest version of NuGet.exe...");
+ WebClient webClient = new WebClient();
+ webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
+
+ return true;
+ }
+ catch (Exception ex) {
+ Log.LogErrorFromException(ex);
+ return false;
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
+</Project>
@@ -0,0 +1,33 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcMusicStore", "MvcMusicStore\MvcMusicStore.csproj", "{32DCD27D-A84C-4250-B657-408B3620A9AC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcMusicStore.FunctionalTests", "MvcMusicStore.FunctionalTests\MvcMusicStore.FunctionalTests.csproj", "{2BEF34DC-D529-4DD7-AA5E-40AD4C31220E}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{EECF998E-6868-457B-B114-35CD6EF819E6}"
+ ProjectSection(SolutionItems) = preProject
+ .nuget\NuGet.Config = .nuget\NuGet.Config
+ .nuget\NuGet.exe = .nuget\NuGet.exe
+ .nuget\NuGet.targets = .nuget\NuGet.targets
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {32DCD27D-A84C-4250-B657-408B3620A9AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {32DCD27D-A84C-4250-B657-408B3620A9AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {32DCD27D-A84C-4250-B657-408B3620A9AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {32DCD27D-A84C-4250-B657-408B3620A9AC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2BEF34DC-D529-4DD7-AA5E-40AD4C31220E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2BEF34DC-D529-4DD7-AA5E-40AD4C31220E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2BEF34DC-D529-4DD7-AA5E-40AD4C31220E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2BEF34DC-D529-4DD7-AA5E-40AD4C31220E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
@@ -0,0 +1,54 @@
+using MvcMusicStore.FunctionalTests.Framework;
+using NUnit.Framework;
+using OpenQA.Selenium;
+
+namespace MvcMusicStore.FunctionalTests
+{
+ public class BrittleTest
+ {
+ [Test]
+ public void Can_buy_an_Album_when_registered()
+ {
+ var driver = Host.Instance.WebDriver;
+ driver.Navigate().GoToUrl(driver.Url);
+ driver.FindElement(By.LinkText("Admin")).Click();
+ driver.FindElement(By.LinkText("Register")).Click();
+ driver.FindElement(By.Id("UserName")).Clear();
+ driver.FindElement(By.Id("UserName")).SendKeys("HJSimpson");
+ driver.FindElement(By.Id("Email")).Clear();
+ driver.FindElement(By.Id("Email")).SendKeys("chunkylover53@aol.com");
+ driver.FindElement(By.Id("Password")).Clear();
+ driver.FindElement(By.Id("Password")).SendKeys("!2345Qwert");
+ driver.FindElement(By.Id("ConfirmPassword")).Clear();
+ driver.FindElement(By.Id("ConfirmPassword")).SendKeys("!2345Qwert");
+ driver.FindElement(By.CssSelector("input[type=\"submit\"]")).Click();
+ driver.FindElement(By.LinkText("Disco")).Click();
+ driver.FindElement(By.CssSelector("img[alt=\"Le Freak\"]")).Click();
+ driver.FindElement(By.LinkText("Add to cart")).Click();
+ driver.FindElement(By.LinkText("Checkout >>")).Click();
+ driver.FindElement(By.Id("FirstName")).Clear();
+ driver.FindElement(By.Id("FirstName")).SendKeys("Homer");
+ driver.FindElement(By.Id("LastName")).Clear();
+ driver.FindElement(By.Id("LastName")).SendKeys("Simpson");
+ driver.FindElement(By.Id("Address")).Clear();
+ driver.FindElement(By.Id("Address")).SendKeys("742 Evergreen Terrace");
+ driver.FindElement(By.Id("City")).Clear();
+ driver.FindElement(By.Id("City")).SendKeys("Springfield");
+ driver.FindElement(By.Id("State")).Clear();
+ driver.FindElement(By.Id("State")).SendKeys("Kentucky");
+ driver.FindElement(By.Id("PostalCode")).Clear();
+ driver.FindElement(By.Id("PostalCode")).SendKeys("123456");
+ driver.FindElement(By.Id("Country")).Clear();
+ driver.FindElement(By.Id("Country")).SendKeys("United States");
+ driver.FindElement(By.Id("Phone")).Clear();
+ driver.FindElement(By.Id("Phone")).SendKeys("2341231241");
+ driver.FindElement(By.Id("Email")).Clear();
+ driver.FindElement(By.Id("Email")).SendKeys("chunkylover53@aol.com");
+ driver.FindElement(By.Id("PromoCode")).Clear();
+ driver.FindElement(By.Id("PromoCode")).SendKeys("FREE");
+ driver.FindElement(By.CssSelector("input[type=\"submit\"]")).Click();
+
+ Assert.IsTrue(driver.PageSource.Contains("Checkout Complete"));
+ }
+ }
+}
@@ -0,0 +1,11 @@
+namespace MvcMusicStore.FunctionalTests.Framework
+{
+ public class Host
+ {
+ internal static readonly SeleniumApplication Instance = new SeleniumApplication();
+ static Host()
+ {
+ Instance.Run("MvcMusicStore", 12345);
+ }
+ }
+}
Oops, something went wrong.

0 comments on commit 1e8d6d5

Please sign in to comment.