How to use defineConstants method of http Package

Best K6 code snippet using http.defineConstants

project_test_file_content.go

Source:project_test_file_content.go Github

copy

Full Screen

1package project2const iosTestProjectContent = `<?xml version="1.0" encoding="utf-8"?>3<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">4 <PropertyGroup>5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>6 <Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>7 <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>8 <ProjectGuid>{90F3C584-FD69-4926-9903-6B9771847782}</ProjectGuid>9 <OutputType>Exe</OutputType>10 <RootNamespace>CreditCardValidator.iOS</RootNamespace>11 <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>12 <AssemblyName>CreditCardValidator.iOS</AssemblyName>13 </PropertyGroup>14 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">15 <DebugSymbols>true</DebugSymbols>16 <AndroidManifest>FalsePath</AndroidManifest>17 <DebugType>full</DebugType>18 <Optimize>false</Optimize>19 <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>20 <DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>21 <ErrorReport>prompt</ErrorReport>22 <WarningLevel>4</WarningLevel>23 <ConsolePause>false</ConsolePause>24 <MtouchArch>i386</MtouchArch>25 <MtouchLink>None</MtouchLink>26 <MtouchDebug>true</MtouchDebug>27 <MtouchProfiling>true</MtouchProfiling>28 </PropertyGroup>29 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">30 <Optimize>true</Optimize>31 <OutputPath>bin\iPhone\Release</OutputPath>32 <ErrorReport>prompt</ErrorReport>33 <WarningLevel>4</WarningLevel>34 <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>35 <MtouchArch>ARMv7, ARM64</MtouchArch>36 <ConsolePause>false</ConsolePause>37 <CodesignKey>iPhone Developer: Bitrise Bot (VV2J4SV8V4)</CodesignKey>38 <CodesignProvision>225561e6-3526-4edc-a046-7e0fa49eb4fe</CodesignProvision>39 <IpaPackageName>40 </IpaPackageName>41 <BuildIpa>true</BuildIpa>42 </PropertyGroup>43 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">44 <DebugType>full</DebugType>45 <Optimize>true</Optimize>46 <OutputPath>bin\iPhoneSimulator\Release</OutputPath>47 <ErrorReport>prompt</ErrorReport>48 <WarningLevel>4</WarningLevel>49 <MtouchArch>i386</MtouchArch>50 <ConsolePause>false</ConsolePause>51 <MtouchLink>None</MtouchLink>52 </PropertyGroup>53 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">54 <DebugSymbols>true</DebugSymbols>55 <DebugType>full</DebugType>56 <Optimize>false</Optimize>57 <OutputPath>bin\iPhone\Debug</OutputPath>58 <DefineConstants>DEBUG;ENABLE_TEST_CLOUD;</DefineConstants>59 <ErrorReport>prompt</ErrorReport>60 <WarningLevel>4</WarningLevel>61 <ConsolePause>false</ConsolePause>62 <MtouchArch>ARMv7, ARM64</MtouchArch>63 <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>64 <MtouchProfiling>true</MtouchProfiling>65 <CodesignKey>iPhone Developer</CodesignKey>66 <MtouchDebug>true</MtouchDebug>67 <MtouchUseRefCounting>true</MtouchUseRefCounting>68 <MtouchI18n>69 </MtouchI18n>70 <IpaPackageName>71 </IpaPackageName>72 </PropertyGroup>73 <ItemGroup>74 <Reference Include="System" />75 <Reference Include="System.Xml" />76 <Reference Include="System.Core" />77 <Reference Include="Xamarin.iOS" />78 <Reference Include="Calabash">79 <HintPath>..\packages\Xamarin.TestCloud.Agent.0.19.1\lib\Xamarin.iOS10\Calabash.dll</HintPath>80 </Reference>81 </ItemGroup>82 <ItemGroup>83 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Contents.json" />84 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-60%402x.png" />85 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon%402x.png" />86 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon.png" />87 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-Small.png" />88 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-Small%402x.png" />89 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-Spotlight-40.png" />90 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-Spotlight-40%402x.png" />91 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-76.png" />92 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-76%402x.png" />93 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-72.png" />94 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-72%402x.png" />95 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-Small-50.png" />96 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Icon-Small-50%402x.png" />97 </ItemGroup>98 <ItemGroup>99 <InterfaceDefinition Include="Resources\LaunchScreen.xib" />100 <InterfaceDefinition Include="Main.storyboard" />101 </ItemGroup>102 <ItemGroup>103 <None Include="Info.plist" />104 <None Include="Entitlements.plist" />105 <None Include="packages.config" />106 </ItemGroup>107 <ItemGroup>108 <Compile Include="Main.cs" />109 <Compile Include="AppDelegate.cs" />110 <Compile Include="ViewController.cs" />111 <Compile Include="ViewController.designer.cs">112 <DependentUpon>ViewController.cs</DependentUpon>113 </Compile>114 <Compile Include="ValidCreditCardController.cs" />115 <Compile Include="ValidCreditCardController.designer.cs">116 <DependentUpon>ValidCreditCardController.cs</DependentUpon>117 </Compile>118 </ItemGroup>119 <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />120 <ItemGroup>121 <ProjectReference Include="..\CreditCardValidator\CreditCardValidator.csproj">122 <Project>{99A825A6-6F99-4B94-9F65-E908A6347F1E}</Project>123 <Name>CreditCardValidator</Name>124 </ProjectReference>125 </ItemGroup>126</Project>`127const androidTestProjectContent = `<?xml version="1.0" encoding="utf-8"?>128<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">129 <PropertyGroup>130 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>131 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>132 <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>133 <ProjectGuid>{9D1D32A3-D13F-4F23-B7D4-EF9D52B06E60}</ProjectGuid>134 <OutputType>Library</OutputType>135 <RootNamespace>CreditCardValidator.Droid</RootNamespace>136 <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>137 <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>138 <AndroidResgenClass>Resource</AndroidResgenClass>139 <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>140 <AndroidApplication>True</AndroidApplication>141 <AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>142 <AssemblyName>CreditCardValidator.Droid</AssemblyName>143 <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>144 <TargetFrameworkVersion>v4.4</TargetFrameworkVersion>145 </PropertyGroup>146 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">147 <DebugSymbols>true</DebugSymbols>148 <DebugType>full</DebugType>149 <Optimize>false</Optimize>150 <OutputPath>bin\Debug</OutputPath>151 <DefineConstants>DEBUG;</DefineConstants>152 <ErrorReport>prompt</ErrorReport>153 <WarningLevel>4</WarningLevel>154 <AndroidLinkMode>None</AndroidLinkMode>155 <ConsolePause>false</ConsolePause>156 <AndroidSigningKeyStore>bitrise-android-keystore.jks</AndroidSigningKeyStore>157 <AndroidSigningStorePass>bitrise</AndroidSigningStorePass>158 <AndroidSigningKeyAlias>bitrise-alias</AndroidSigningKeyAlias>159 <AndroidSigningKeyPass>bitrise</AndroidSigningKeyPass>160 </PropertyGroup>161 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">162 <DebugType>full</DebugType>163 <Optimize>true</Optimize>164 <OutputPath>bin\Release</OutputPath>165 <ErrorReport>prompt</ErrorReport>166 <WarningLevel>4</WarningLevel>167 <ConsolePause>false</ConsolePause>168 <AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis>169 <AndroidSigningKeyStore>bitrise-android-keystore.jks</AndroidSigningKeyStore>170 <AndroidSigningStorePass>bitrise</AndroidSigningStorePass>171 <AndroidSigningKeyAlias>bitrise-alias</AndroidSigningKeyAlias>172 <AndroidSigningKeyPass>bitrise</AndroidSigningKeyPass>173 <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>174 <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>175 <AndroidKeyStore>True</AndroidKeyStore>176 </PropertyGroup>177 <ItemGroup>178 <Reference Include="System" />179 <Reference Include="System.Xml" />180 <Reference Include="System.Core" />181 <Reference Include="Mono.Android" />182 </ItemGroup>183 <ItemGroup>184 <Compile Include="MainActivity.cs" />185 <Compile Include="Resources\Resource.designer.cs" />186 <Compile Include="Properties\AssemblyInfo.cs" />187 <Compile Include="CreditCardValidationSuccess.cs" />188 </ItemGroup>189 <ItemGroup>190 <None Include="Resources\AboutResources.txt" />191 <None Include="Properties\AndroidManifest.xml" />192 <None Include="Assets\AboutAssets.txt" />193 </ItemGroup>194 <ItemGroup>195 <AndroidResource Include="Resources\layout\Main.axml" />196 <AndroidResource Include="Resources\values\Strings.xml" />197 <AndroidResource Include="Resources\drawable-hdpi\Icon.png" />198 <AndroidResource Include="Resources\drawable-mdpi\Icon.png" />199 <AndroidResource Include="Resources\drawable-xhdpi\Icon.png" />200 <AndroidResource Include="Resources\drawable-xxhdpi\Icon.png" />201 <AndroidResource Include="Resources\drawable-xxxhdpi\Icon.png" />202 <AndroidResource Include="Resources\layout\CreditCardValidationSuccess.axml" />203 </ItemGroup>204 <ItemGroup>205 <ProjectReference Include="..\CreditCardValidator\CreditCardValidator.csproj">206 <Project>{99A825A6-6F99-4B94-9F65-E908A6347F1E}</Project>207 <Name>CreditCardValidator</Name>208 </ProjectReference>209 </ItemGroup>210 <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />211</Project>`212// A valid xml, but unformatted in one line. The previous parse and regex by line won't work here.213const androidTestProjectUnformattedContent = `<?xml version="1.0" encoding="utf-8"?><Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><PropertyGroup><Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration><Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform><ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids><ProjectGuid>{9D1D32A3-D13F-4F23-B7D4-EF9D52B06E60}</ProjectGuid><OutputType>Library</OutputType><RootNamespace>CreditCardValidator.Droid</RootNamespace><MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix><MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix><AndroidResgenClass>Resource</AndroidResgenClass><AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile><AndroidApplication>True</AndroidApplication><AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk><AssemblyName>CreditCardValidator.Droid</AssemblyName><AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest><TargetFrameworkVersion>v4.4</TargetFrameworkVersion></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "><DebugSymbols>true</DebugSymbols><DebugType>full</DebugType><Optimize>false</Optimize><OutputPath>bin\Debug</OutputPath><DefineConstants>DEBUG;</DefineConstants><ErrorReport>prompt</ErrorReport><WarningLevel>4</WarningLevel><AndroidLinkMode>None</AndroidLinkMode><ConsolePause>false</ConsolePause><AndroidSigningKeyStore>bitrise-android-keystore.jks</AndroidSigningKeyStore><AndroidSigningStorePass>bitrise</AndroidSigningStorePass><AndroidSigningKeyAlias>bitrise-alias</AndroidSigningKeyAlias><AndroidSigningKeyPass>bitrise</AndroidSigningKeyPass></PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "><DebugType>full</DebugType><Optimize>true</Optimize><OutputPath>bin\Release</OutputPath><ErrorReport>prompt</ErrorReport><WarningLevel>4</WarningLevel><ConsolePause>false</ConsolePause><AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis><AndroidSigningKeyStore>bitrise-android-keystore.jks</AndroidSigningKeyStore><AndroidSigningStorePass>bitrise</AndroidSigningStorePass><AndroidSigningKeyAlias>bitrise-alias</AndroidSigningKeyAlias><AndroidSigningKeyPass>bitrise</AndroidSigningKeyPass><EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk><AndroidUseSharedRuntime>false</AndroidUseSharedRuntime><AndroidKeyStore>True</AndroidKeyStore></PropertyGroup><ItemGroup><Reference Include="System" /><Reference Include="System.Xml" /><Reference Include="System.Core" /><Reference Include="Mono.Android" /></ItemGroup><ItemGroup><Compile Include="MainActivity.cs" /><Compile Include="Resources\Resource.designer.cs" /><Compile Include="Properties\AssemblyInfo.cs" /><Compile Include="CreditCardValidationSuccess.cs" /></ItemGroup><ItemGroup><None Include="Resources\AboutResources.txt" /><None Include="Properties\AndroidManifest.xml" /><None Include="Assets\AboutAssets.txt" /></ItemGroup><ItemGroup><AndroidResource Include="Resources\layout\Main.axml" /><AndroidResource Include="Resources\values\Strings.xml" /><AndroidResource Include="Resources\drawable-hdpi\Icon.png" /><AndroidResource Include="Resources\drawable-mdpi\Icon.png" /><AndroidResource Include="Resources\drawable-xhdpi\Icon.png" /><AndroidResource Include="Resources\drawable-xxhdpi\Icon.png" /><AndroidResource Include="Resources\drawable-xxxhdpi\Icon.png" /><AndroidResource Include="Resources\layout\CreditCardValidationSuccess.axml" /></ItemGroup><ItemGroup><ProjectReference Include="..\CreditCardValidator\CreditCardValidator.csproj"><Project>{99A825A6-6F99-4B94-9F65-E908A6347F1E}</Project><Name>CreditCardValidator</Name></ProjectReference></ItemGroup><Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /></Project>`214// A valid xml, but the Android manifest path is redefined. Always the last item should be used.215const androidTestProjectContentWithRedefine = `<?xml version="1.0" encoding="utf-8"?>216<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">217 <PropertyGroup>218 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>219 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>220 <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>221 <ProjectGuid>{9D1D32A3-D13F-4F23-B7D4-EF9D52B06E60}</ProjectGuid>222 <OutputType>Library</OutputType>223 <RootNamespace>CreditCardValidator.Droid</RootNamespace>224 <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>225 <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>226 <AndroidResgenClass>Resource</AndroidResgenClass>227 <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>228 <AndroidApplication>True</AndroidApplication>229 <AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>230 <AssemblyName>CreditCardValidator.Droid</AssemblyName>231 <AndroidManifest>Bad</AndroidManifest>232 <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>233 <TargetFrameworkVersion>v4.4</TargetFrameworkVersion>234 </PropertyGroup>235 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">236 <DebugSymbols>true</DebugSymbols>237 <DebugType>full</DebugType>238 <Optimize>false</Optimize>239 <OutputPath>bin\Debug</OutputPath>240 <DefineConstants>DEBUG;</DefineConstants>241 <ErrorReport>prompt</ErrorReport>242 <WarningLevel>4</WarningLevel>243 <AndroidLinkMode>None</AndroidLinkMode>244 <ConsolePause>false</ConsolePause>245 <AndroidSigningKeyStore>bitrise-android-keystore.jks</AndroidSigningKeyStore>246 <AndroidSigningStorePass>bitrise</AndroidSigningStorePass>247 <AndroidSigningKeyAlias>bitrise-alias</AndroidSigningKeyAlias>248 <AndroidSigningKeyPass>bitrise</AndroidSigningKeyPass>249 </PropertyGroup>250 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">251 <DebugType>full</DebugType>252 <Optimize>true</Optimize>253 <OutputPath>bin\Release</OutputPath>254 <ErrorReport>prompt</ErrorReport>255 <WarningLevel>4</WarningLevel>256 <ConsolePause>false</ConsolePause>257 <AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis>258 <AndroidSigningKeyStore>bitrise-android-keystore.jks</AndroidSigningKeyStore>259 <AndroidSigningStorePass>bitrise</AndroidSigningStorePass>260 <AndroidSigningKeyAlias>bitrise-alias</AndroidSigningKeyAlias>261 <AndroidSigningKeyPass>bitrise</AndroidSigningKeyPass>262 <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>263 <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>264 <AndroidKeyStore>True</AndroidKeyStore>265 </PropertyGroup>266 <ItemGroup>267 <Reference Include="System" />268 <Reference Include="System.Xml" />269 <Reference Include="System.Core" />270 <Reference Include="Mono.Android" />271 </ItemGroup>272 <ItemGroup>273 <Compile Include="MainActivity.cs" />274 <Compile Include="Resources\Resource.designer.cs" />275 <Compile Include="Properties\AssemblyInfo.cs" />276 <Compile Include="CreditCardValidationSuccess.cs" />277 </ItemGroup>278 <ItemGroup>279 <None Include="Resources\AboutResources.txt" />280 <None Include="Properties\AndroidManifest.xml" />281 <None Include="Assets\AboutAssets.txt" />282 </ItemGroup>283 <ItemGroup>284 <AndroidResource Include="Resources\layout\Main.axml" />285 <AndroidResource Include="Resources\values\Strings.xml" />286 <AndroidResource Include="Resources\drawable-hdpi\Icon.png" />287 <AndroidResource Include="Resources\drawable-mdpi\Icon.png" />288 <AndroidResource Include="Resources\drawable-xhdpi\Icon.png" />289 <AndroidResource Include="Resources\drawable-xxhdpi\Icon.png" />290 <AndroidResource Include="Resources\drawable-xxxhdpi\Icon.png" />291 <AndroidResource Include="Resources\layout\CreditCardValidationSuccess.axml" />292 </ItemGroup>293 <ItemGroup>294 <ProjectReference Include="..\CreditCardValidator\CreditCardValidator.csproj">295 <Project>{99A825A6-6F99-4B94-9F65-E908A6347F1E}</Project>296 <Name>CreditCardValidator</Name>297 </ProjectReference>298 </ItemGroup>299 <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />300</Project>`301const macTestProjectContent = `<?xml version="1.0" encoding="utf-8"?>302<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">303 <PropertyGroup>304 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>305 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>306 <ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>307 <ProjectGuid>{4DA5EAC6-6F80-4FEC-AF81-194210F10B51}</ProjectGuid>308 <OutputType>Exe</OutputType>309 <RootNamespace>Hello_Mac</RootNamespace>310 <MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>311 <AssemblyName>Hello_Mac</AssemblyName>312 <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>313 <TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>314 </PropertyGroup>315 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">316 <DebugSymbols>true</DebugSymbols>317 <DebugType>full</DebugType>318 <Optimize>false</Optimize>319 <OutputPath>bin\Debug</OutputPath>320 <DefineConstants>DEBUG;</DefineConstants>321 <ErrorReport>prompt</ErrorReport>322 <WarningLevel>4</WarningLevel>323 <ConsolePause>false</ConsolePause>324 <Profiling>true</Profiling>325 <UseRefCounting>true</UseRefCounting>326 <UseSGen>true</UseSGen>327 <IncludeMonoRuntime>false</IncludeMonoRuntime>328 <CreatePackage>false</CreatePackage>329 <CodeSigningKey>Mac Developer</CodeSigningKey>330 <EnableCodeSigning>false</EnableCodeSigning>331 <EnablePackageSigning>false</EnablePackageSigning>332 <PackageSigningKey>Developer ID Installer</PackageSigningKey>333 <CodeSignEntitlements>Entitlements.plist</CodeSignEntitlements>334 </PropertyGroup>335 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">336 <DebugType>full</DebugType>337 <Optimize>true</Optimize>338 <OutputPath>bin\Release</OutputPath>339 <ErrorReport>prompt</ErrorReport>340 <WarningLevel>4</WarningLevel>341 <ConsolePause>false</ConsolePause>342 <LinkMode>SdkOnly</LinkMode>343 <Profiling>false</Profiling>344 <UseRefCounting>true</UseRefCounting>345 <UseSGen>true</UseSGen>346 <IncludeMonoRuntime>true</IncludeMonoRuntime>347 <CreatePackage>true</CreatePackage>348 <CodeSigningKey>Mac Developer</CodeSigningKey>349 <EnableCodeSigning>true</EnableCodeSigning>350 <EnablePackageSigning>false</EnablePackageSigning>351 <PackageSigningKey>Developer ID Installer</PackageSigningKey>352 <XamMacArch>x86_64</XamMacArch>353 <CodeSignProvision>Automatic</CodeSignProvision>354 <CodeSignEntitlements>Entitlements.plist</CodeSignEntitlements>355 </PropertyGroup>356 <ItemGroup>357 <Reference Include="System" />358 <Reference Include="System.Core" />359 <Reference Include="Xamarin.Mac" />360 </ItemGroup>361 <ItemGroup>362 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\Contents.json" />363 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-128.png" />364 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-128%402x.png" />365 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-16.png" />366 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-16%402x.png" />367 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-256.png" />368 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-256%402x.png" />369 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-32.png" />370 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-32%402x.png" />371 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-512.png" />372 <ImageAsset Include="Resources\Images.xcassets\AppIcons.appiconset\AppIcon-512%402x.png" />373 </ItemGroup>374 <ItemGroup>375 <None Include="Info.plist" />376 <None Include="Entitlements.plist" />377 </ItemGroup>378 <ItemGroup>379 <Compile Include="Main.cs" />380 <Compile Include="AppDelegate.cs" />381 <Compile Include="ViewController.cs" />382 <Compile Include="ViewController.designer.cs">383 <DependentUpon>ViewController.cs</DependentUpon>384 </Compile>385 </ItemGroup>386 <ItemGroup>387 <InterfaceDefinition Include="Main.storyboard" />388 </ItemGroup>389 <Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />390</Project>`391const tvTestProjectContent = `<?xml version="1.0" encoding="utf-8"?>392<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">393 <PropertyGroup>394 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>395 <Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>396 <ProjectGuid>{51D9C362-2997-4029-B38F-06C36F17056E}</ProjectGuid>397 <ProjectTypeGuids>{06FA79CB-D6CD-4721-BB4B-1BD202089C55};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>398 <OutputType>Exe</OutputType>399 <RootNamespace>tvos</RootNamespace>400 <AssemblyName>tvos</AssemblyName>401 <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>402 </PropertyGroup>403 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">404 <DebugSymbols>true</DebugSymbols>405 <DebugType>full</DebugType>406 <Optimize>false</Optimize>407 <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>408 <DefineConstants>DEBUG;</DefineConstants>409 <ErrorReport>prompt</ErrorReport>410 <WarningLevel>4</WarningLevel>411 <ConsolePause>false</ConsolePause>412 <CodesignKey>iPhone Developer</CodesignKey>413 <MtouchDebug>true</MtouchDebug>414 <MtouchFastDev>true</MtouchFastDev>415 <MtouchProfiling>true</MtouchProfiling>416 <MtouchUseSGen>true</MtouchUseSGen>417 <MtouchUseRefCounting>true</MtouchUseRefCounting>418 <MtouchLink>None</MtouchLink>419 <MtouchArch>x86_64</MtouchArch>420 <MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>421 <MtouchTlsProvider>Default</MtouchTlsProvider>422 <PlatformTarget>x86</PlatformTarget>423 </PropertyGroup>424 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">425 <Optimize>true</Optimize>426 <OutputPath>bin\iPhone\Release</OutputPath>427 <ErrorReport>prompt</ErrorReport>428 <WarningLevel>4</WarningLevel>429 <ConsolePause>false</ConsolePause>430 <CodesignKey>iPhone Developer</CodesignKey>431 <MtouchUseLlvm>true</MtouchUseLlvm>432 <MtouchUseSGen>true</MtouchUseSGen>433 <MtouchUseRefCounting>true</MtouchUseRefCounting>434 <MtouchFloat32>true</MtouchFloat32>435 <MtouchEnableBitcode>true</MtouchEnableBitcode>436 <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>437 <MtouchLink>SdkOnly</MtouchLink>438 <MtouchArch>ARM64</MtouchArch>439 <MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>440 <MtouchTlsProvider>Default</MtouchTlsProvider>441 <PlatformTarget>x86</PlatformTarget>442 </PropertyGroup>443 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">444 <Optimize>true</Optimize>445 <OutputPath>bin\iPhoneSimulator\Release</OutputPath>446 <ErrorReport>prompt</ErrorReport>447 <WarningLevel>4</WarningLevel>448 <ConsolePause>false</ConsolePause>449 <CodesignKey>iPhone Developer</CodesignKey>450 <MtouchUseSGen>true</MtouchUseSGen>451 <MtouchUseRefCounting>true</MtouchUseRefCounting>452 <MtouchLink>None</MtouchLink>453 <MtouchArch>x86_64</MtouchArch>454 <MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>455 <MtouchTlsProvider>Default</MtouchTlsProvider>456 <PlatformTarget>x86</PlatformTarget>457 </PropertyGroup>458 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">459 <DebugSymbols>true</DebugSymbols>460 <DebugType>full</DebugType>461 <Optimize>false</Optimize>462 <OutputPath>bin\iPhone\Debug</OutputPath>463 <DefineConstants>DEBUG;</DefineConstants>464 <ErrorReport>prompt</ErrorReport>465 <WarningLevel>4</WarningLevel>466 <ConsolePause>false</ConsolePause>467 <CodesignKey>iPhone Developer</CodesignKey>468 <DeviceSpecificBuild>true</DeviceSpecificBuild>469 <MtouchDebug>true</MtouchDebug>470 <MtouchFastDev>true</MtouchFastDev>471 <MtouchProfiling>true</MtouchProfiling>472 <MtouchUseSGen>true</MtouchUseSGen>473 <MtouchUseRefCounting>true</MtouchUseRefCounting>474 <MtouchFloat32>true</MtouchFloat32>475 <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>476 <MtouchLink>SdkOnly</MtouchLink>477 <MtouchArch>ARM64</MtouchArch>478 <MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>479 <MtouchTlsProvider>Default</MtouchTlsProvider>480 <PlatformTarget>x86</PlatformTarget>481 </PropertyGroup>482 <ItemGroup>483 <Reference Include="System" />484 <Reference Include="System.Xml" />485 <Reference Include="System.Core" />486 <Reference Include="Xamarin.TVOS" />487 </ItemGroup>488 <ItemGroup>489 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\Contents.json" />490 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Large.imagestack\Contents.json" />491 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Large.imagestack\Back.imagestacklayer\Contents.json" />492 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Large.imagestack\Back.imagestacklayer\Content.imageset\Contents.json" />493 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Large.imagestack\Front.imagestacklayer\Contents.json" />494 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Large.imagestack\Front.imagestacklayer\Content.imageset\Contents.json" />495 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Large.imagestack\Middle.imagestacklayer\Contents.json" />496 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Large.imagestack\Middle.imagestacklayer\Content.imageset\Contents.json" />497 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Small.imagestack\Contents.json" />498 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Small.imagestack\Back.imagestacklayer\Contents.json" />499 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Small.imagestack\Back.imagestacklayer\Content.imageset\Contents.json" />500 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Small.imagestack\Front.imagestacklayer\Contents.json" />501 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Small.imagestack\Front.imagestacklayer\Content.imageset\Contents.json" />502 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Small.imagestack\Middle.imagestacklayer\Contents.json" />503 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\App Icon - Small.imagestack\Middle.imagestacklayer\Content.imageset\Contents.json" />504 <ImageAsset Include="Assets.xcassets\App Icon &amp; Top Shelf Image.brandassets\Top Shelf Image.imageset\Contents.json" />505 <ImageAsset Include="Assets.xcassets\LaunchImages.launchimage\Contents.json" />506 <ImageAsset Include="Assets.xcassets\Contents.json" />507 </ItemGroup>508 <ItemGroup>509 <Folder Include="Resources\" />510 </ItemGroup>511 <ItemGroup>512 <None Include="Info.plist" />513 <None Include="Entitlements.plist" />514 </ItemGroup>515 <ItemGroup>516 <Compile Include="Main.cs" />517 <Compile Include="AppDelegate.cs" />518 <Compile Include="ViewController.cs" />519 <Compile Include="ViewController.designer.cs">520 <DependentUpon>ViewController.cs</DependentUpon>521 </Compile>522 </ItemGroup>523 <ItemGroup>524 <InterfaceDefinition Include="Main.storyboard" />525 </ItemGroup>526 <Import Project="$(MSBuildExtensionsPath)\Xamarin\TVOS\Xamarin.TVOS.CSharp.targets" />527</Project>`528const xamarinUITestProjectContent = `<?xml version="1.0" encoding="utf-8"?>529<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">530 <PropertyGroup>531 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>532 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>533 <ProjectGuid>{BA48743D-06F3-4D2D-ACFD-EE2642CE155A}</ProjectGuid>534 <OutputType>Library</OutputType>535 <RootNamespace>CreditCardValidator.iOS.UITests</RootNamespace>536 <AssemblyName>CreditCardValidator.iOS.UITests</AssemblyName>537 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>538 </PropertyGroup>539 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">540 <DebugSymbols>true</DebugSymbols>541 <DebugType>full</DebugType>542 <Optimize>false</Optimize>543 <OutputPath>bin\Debug</OutputPath>544 <DefineConstants>DEBUG;</DefineConstants>545 <ErrorReport>prompt</ErrorReport>546 <WarningLevel>4</WarningLevel>547 <ConsolePause>false</ConsolePause>548 </PropertyGroup>549 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">550 <DebugType>full</DebugType>551 <Optimize>true</Optimize>552 <OutputPath>bin\Release</OutputPath>553 <ErrorReport>prompt</ErrorReport>554 <WarningLevel>4</WarningLevel>555 <ConsolePause>false</ConsolePause>556 </PropertyGroup>557 <ItemGroup>558 <Reference Include="System" />559 <Reference Include="nunit.framework">560 <HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>561 </Reference>562 <Reference Include="Xamarin.UITest">563 <HintPath>..\packages\Xamarin.UITest.1.3.8\lib\Xamarin.UITest.dll</HintPath>564 </Reference>565 </ItemGroup>566 <ItemGroup>567 <ProjectReference Include="..\CreditCardValidator.iOS\CreditCardValidator.iOS.csproj">568 <Project>{90F3C584-FD69-4926-9903-6B9771847782}</Project>569 <Name>CreditCardValidator.iOS</Name>570 <ReferenceOutputAssembly>False</ReferenceOutputAssembly>571 <Private>False</Private>572 </ProjectReference>573 </ItemGroup>574 <ItemGroup>575 <Compile Include="Tests.cs" />576 </ItemGroup>577 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />578 <ItemGroup>579 <None Include="packages.config" />580 </ItemGroup>581</Project>`582const nunitTestProjectContent = `<?xml version="1.0" encoding="utf-8"?>583<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">584 <PropertyGroup>585 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>586 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>587 <ProjectGuid>{ED150913-76EB-446F-8B78-DC77E5795703}</ProjectGuid>588 <OutputType>Library</OutputType>589 <RootNamespace>CreditCardValidator.iOS.NunitTests</RootNamespace>590 <AssemblyName>CreditCardValidator.iOS.NunitTests</AssemblyName>591 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>592 </PropertyGroup>593 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">594 <DebugSymbols>true</DebugSymbols>595 <DebugType>full</DebugType>596 <Optimize>false</Optimize>597 <OutputPath>bin\Debug</OutputPath>598 <DefineConstants>DEBUG;</DefineConstants>599 <ErrorReport>prompt</ErrorReport>600 <WarningLevel>4</WarningLevel>601 <ConsolePause>false</ConsolePause>602 </PropertyGroup>603 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">604 <DebugType>full</DebugType>605 <Optimize>true</Optimize>606 <OutputPath>bin\Release</OutputPath>607 <ErrorReport>prompt</ErrorReport>608 <WarningLevel>4</WarningLevel>609 <ConsolePause>false</ConsolePause>610 </PropertyGroup>611 <ItemGroup>612 <Reference Include="System" />613 <Reference Include="nunit.framework">614 <HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>615 </Reference>616 </ItemGroup>617 <ItemGroup>618 <Compile Include="Test.cs" />619 </ItemGroup>620 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />621 <ItemGroup>622 <None Include="packages.config" />623 </ItemGroup>624</Project>`625const nunitLiteTestProjectContent = `<?xml version="1.0" encoding="utf-8"?>626<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">627 <PropertyGroup>628 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>629 <Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>630 <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>631 <ProjectGuid>{95615CA5-0D75-4389-A6E0-78309A686712}</ProjectGuid>632 <OutputType>Exe</OutputType>633 <RootNamespace>CreditCardValidator.iOS.NunitLiteTests</RootNamespace>634 <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>635 <AssemblyName>CreditCardValidator.iOS.NunitLiteTests</AssemblyName>636 </PropertyGroup>637 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">638 <DebugSymbols>true</DebugSymbols>639 <DebugType>full</DebugType>640 <Optimize>false</Optimize>641 <OutputPath>bin\iPhoneSimulator\Debug</OutputPath>642 <DefineConstants>DEBUG;</DefineConstants>643 <ErrorReport>prompt</ErrorReport>644 <WarningLevel>4</WarningLevel>645 <ConsolePause>false</ConsolePause>646 <MtouchArch>i386</MtouchArch>647 <MtouchLink>None</MtouchLink>648 <MtouchUseRefCounting>true</MtouchUseRefCounting>649 <MtouchUseSGen>true</MtouchUseSGen>650 <MtouchFastDev>true</MtouchFastDev>651 <MtouchDebug>true</MtouchDebug>652 <CodesignKey>iPhone Developer</CodesignKey>653 <MtouchProfiling>true</MtouchProfiling>654 </PropertyGroup>655 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">656 <DebugType>full</DebugType>657 <Optimize>true</Optimize>658 <OutputPath>bin\iPhone\Release</OutputPath>659 <ErrorReport>prompt</ErrorReport>660 <WarningLevel>4</WarningLevel>661 <ConsolePause>false</ConsolePause>662 <MtouchArch>ARMv7, ARM64</MtouchArch>663 <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>664 <MtouchFloat32>true</MtouchFloat32>665 <MtouchUseSGen>true</MtouchUseSGen>666 <CodesignKey>iPhone Developer</CodesignKey>667 <MtouchUseRefCounting>true</MtouchUseRefCounting>668 </PropertyGroup>669 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">670 <DebugType>full</DebugType>671 <Optimize>true</Optimize>672 <OutputPath>bin\iPhoneSimulator\Release</OutputPath>673 <ErrorReport>prompt</ErrorReport>674 <WarningLevel>4</WarningLevel>675 <ConsolePause>false</ConsolePause>676 <MtouchArch>i386</MtouchArch>677 <MtouchLink>None</MtouchLink>678 <MtouchUseRefCounting>true</MtouchUseRefCounting>679 <CodesignKey>iPhone Developer</CodesignKey>680 <MtouchUseSGen>true</MtouchUseSGen>681 </PropertyGroup>682 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">683 <DebugSymbols>true</DebugSymbols>684 <DebugType>full</DebugType>685 <Optimize>false</Optimize>686 <OutputPath>bin\iPhone\Debug</OutputPath>687 <DefineConstants>DEBUG;</DefineConstants>688 <ErrorReport>prompt</ErrorReport>689 <WarningLevel>4</WarningLevel>690 <ConsolePause>false</ConsolePause>691 <MtouchArch>ARMv7, ARM64</MtouchArch>692 <CodesignEntitlements>Entitlements.plist</CodesignEntitlements>693 <MtouchFloat32>true</MtouchFloat32>694 <CodesignKey>iPhone Developer</CodesignKey>695 <DeviceSpecificBuild>true</DeviceSpecificBuild>696 <MtouchDebug>true</MtouchDebug>697 <MtouchUseSGen>true</MtouchUseSGen>698 <MtouchUseRefCounting>true</MtouchUseRefCounting>699 <MtouchProfiling>true</MtouchProfiling>700 </PropertyGroup>701 <ItemGroup>702 <Reference Include="System" />703 <Reference Include="System.Xml" />704 <Reference Include="System.Core" />705 <Reference Include="Xamarin.iOS" />706 <Reference Include="MonoTouch.NUnitLite" />707 </ItemGroup>708 <ItemGroup>709 <Folder Include="Resources\" />710 </ItemGroup>711 <ItemGroup>712 <None Include="Info.plist" />713 <None Include="Entitlements.plist" />714 </ItemGroup>715 <ItemGroup>716 <Compile Include="Main.cs" />717 <Compile Include="UnitTestAppDelegate.cs" />718 <Compile Include="TestsSample.cs" />719 </ItemGroup>720 <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />721</Project>`...

Full Screen

Full Screen

testdata_test.go

Source:testdata_test.go Github

copy

Full Screen

1package cmd2const testSolutionContent = `3Microsoft Visual Studio Solution File, Format Version 12.004# Visual Studio Version 165VisualStudioVersion = 16.0.30104.1486MinimumVisualStudioVersion = 10.0.40219.17Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "a", "a\a.csproj", "{3F69AE61-CC2E-40DB-B3CE-77ABD9BF327F}"8EndProject9Global10 GlobalSection(SolutionConfigurationPlatforms) = preSolution11 Debug|Any CPU = Debug|Any CPU12 Release|Any CPU = Release|Any CPU13 EndGlobalSection14 GlobalSection(ProjectConfigurationPlatforms) = postSolution15 {3F69AE61-CC2E-40DB-B3CE-77ABD9BF327F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU16 {3F69AE61-CC2E-40DB-B3CE-77ABD9BF327F}.Debug|Any CPU.Build.0 = Debug|Any CPU17 {3F69AE61-CC2E-40DB-B3CE-77ABD9BF327F}.Release|Any CPU.ActiveCfg = Release|Any CPU18 {3F69AE61-CC2E-40DB-B3CE-77ABD9BF327F}.Release|Any CPU.Build.0 = Release|Any CPU19 EndGlobalSection20 GlobalSection(SolutionProperties) = preSolution21 HideSolutionNode = FALSE22 EndGlobalSection23 GlobalSection(ExtensibilityGlobals) = postSolution24 SolutionGuid = {99ED9FBC-1A1E-43E7-88E0-9B83F88985CC}25 EndGlobalSection26EndGlobal27`28const testProjectContent = `<?xml version="1.0" encoding="utf-8"?>29<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">30 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />31 <PropertyGroup>32 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>33 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>34 <ProjectGuid>{3F69AE61-CC2E-40DB-B3CE-77ABD9BF327F}</ProjectGuid>35 <OutputType>Exe</OutputType>36 <RootNamespace>a</RootNamespace>37 <AssemblyName>a</AssemblyName>38 <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>39 <FileAlignment>512</FileAlignment>40 <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>41 <Deterministic>true</Deterministic>42 </PropertyGroup>43 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">44 <PlatformTarget>AnyCPU</PlatformTarget>45 <DebugSymbols>true</DebugSymbols>46 <DebugType>full</DebugType>47 <Optimize>false</Optimize>48 <OutputPath>bin\Debug\</OutputPath>49 <DefineConstants>DEBUG;TRACE</DefineConstants>50 <ErrorReport>prompt</ErrorReport>51 <WarningLevel>4</WarningLevel>52 </PropertyGroup>53 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">54 <PlatformTarget>AnyCPU</PlatformTarget>55 <DebugType>pdbonly</DebugType>56 <Optimize>true</Optimize>57 <OutputPath>bin\Release\</OutputPath>58 <DefineConstants>TRACE</DefineConstants>59 <ErrorReport>prompt</ErrorReport>60 <WarningLevel>4</WarningLevel>61 </PropertyGroup>62 <ItemGroup>63 <Reference Include="CmdLine, Version=1.0.7.509, Culture=neutral, PublicKeyToken=e6ac9ead3d3b48e4, processorArchitecture=MSIL">64 <HintPath>..\packages\CmdLine.1.0.7.509\lib\net40-Client\CmdLine.dll</HintPath>65 </Reference>66 <Reference Include="System" />67 <Reference Include="System.Core" />68 <Reference Include="System.Xml.Linq" />69 <Reference Include="System.Data.DataSetExtensions" />70 <Reference Include="Microsoft.CSharp" />71 <Reference Include="System.Data" />72 <Reference Include="System.Net.Http" />73 <Reference Include="System.Xml" />74 </ItemGroup>75 <ItemGroup>76 <Compile Include="Program.cs" />77 <Compile Include="Properties\AssemblyInfo.cs" />78 </ItemGroup>79 <ItemGroup>80 <None Include="App.config" />81 <None Include="packages.config" />82 </ItemGroup>83 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />84</Project>85`86const testProjectContent2 = `<?xml version="1.0" encoding="utf-8"?>87<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">88 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />89 <PropertyGroup>90 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>91 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>92 <ProjectGuid>{7DBA74EF-3FCF-422B-B6EC-5EC4849C575A}</ProjectGuid>93 <OutputType>Exe</OutputType>94 <RootNamespace>braces</RootNamespace>95 <AssemblyName>braces</AssemblyName>96 <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>97 <FileAlignment>512</FileAlignment>98 <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>99 <Deterministic>true</Deterministic>100 </PropertyGroup>101 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">102 <PlatformTarget>AnyCPU</PlatformTarget>103 <DebugSymbols>true</DebugSymbols>104 <DebugType>full</DebugType>105 <Optimize>false</Optimize>106 <OutputPath>bin\Debug\</OutputPath>107 <DefineConstants>DEBUG;TRACE</DefineConstants>108 <ErrorReport>prompt</ErrorReport>109 <WarningLevel>4</WarningLevel>110 </PropertyGroup>111 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">112 <PlatformTarget>AnyCPU</PlatformTarget>113 <DebugType>pdbonly</DebugType>114 <Optimize>true</Optimize>115 <OutputPath>bin\Release\</OutputPath>116 <DefineConstants>TRACE</DefineConstants>117 <ErrorReport>prompt</ErrorReport>118 <WarningLevel>4</WarningLevel>119 </PropertyGroup>120 <ItemGroup>121 <Reference Include="System" />122 <Reference Include="System.Core" />123 <Reference Include="System.Xml.Linq" />124 <Reference Include="System.Data.DataSetExtensions" />125 <Reference Include="Microsoft.CSharp" />126 <Reference Include="System.Data" />127 <Reference Include="System.Net.Http" />128 <Reference Include="System.Xml" />129 </ItemGroup>130 <ItemGroup>131 <Compile Include="Program.cs" />132 <Compile Include="Properties\AssemblyInfo.cs" />133 </ItemGroup>134 <ItemGroup>135 <None Include="App.config" />136 </ItemGroup>137 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />138</Project>139`140const testProjectContent3 = `<?xml version="1.0" encoding="utf-8"?>141<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">142 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />143 <PropertyGroup>144 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>145 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>146 <ProjectGuid>{7DBA74EF-3FCF-422B-B6EC-5EC4849C575A}</ProjectGuid>147 <OutputType>Exe</OutputType>148 <RootNamespace>braces</RootNamespace>149 <AssemblyName>braces</AssemblyName>150 <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>151 <FileAlignment>512</FileAlignment>152 <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>153 <Deterministic>true</Deterministic>154 </PropertyGroup>155 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">156 <PlatformTarget>AnyCPU</PlatformTarget>157 <DebugSymbols>true</DebugSymbols>158 <DebugType>full</DebugType>159 <Optimize>false</Optimize>160 <OutputPath>bin\Debug\</OutputPath>161 <DefineConstants>DEBUG;TRACE</DefineConstants>162 <ErrorReport>prompt</ErrorReport>163 <WarningLevel>4</WarningLevel>164 </PropertyGroup>165 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">166 <PlatformTarget>AnyCPU</PlatformTarget>167 <DebugType>pdbonly</DebugType>168 <Optimize>true</Optimize>169 <OutputPath>bin\Release\</OutputPath>170 <DefineConstants>TRACE</DefineConstants>171 <ErrorReport>prompt</ErrorReport>172 <WarningLevel>4</WarningLevel>173 </PropertyGroup>174 <ItemGroup>175 <Reference Include="System" />176 <Reference Include="System.Core" />177 <Reference Include="System.Xml.Linq" />178 <Reference Include="System.Data.DataSetExtensions" />179 <Reference Include="Microsoft.CSharp" />180 <Reference Include="System.Data" />181 <Reference Include="System.Net.Http" />182 <Reference Include="System.Xml" />183 </ItemGroup>184 <ItemGroup>185 <Compile Include="..\a\Program.cs">186 <Link>Program.cs</Link>187 </Compile>188 <Compile Include="..\a\Properties\AssemblyInfo.cs">189 <Link>Properties\AssemblyInfo.cs</Link>190 </Compile>191 </ItemGroup>192 <ItemGroup>193 <None Include="App.config" />194 </ItemGroup>195 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />196</Project>197`198const testProjectContent3a1 = `<?xml version="1.0" encoding="utf-8"?>199<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">200 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />201 <PropertyGroup>202 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>203 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>204 <ProjectGuid>{7DBA74EF-3FCF-422B-B6EC-5EC4849C575A}</ProjectGuid>205 <OutputType>Exe</OutputType>206 <RootNamespace>braces</RootNamespace>207 <AssemblyName>braces</AssemblyName>208 <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>209 <FileAlignment>512</FileAlignment>210 <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>211 <Deterministic>true</Deterministic>212 </PropertyGroup>213 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">214 <PlatformTarget>AnyCPU</PlatformTarget>215 <DebugSymbols>true</DebugSymbols>216 <DebugType>full</DebugType>217 <Optimize>false</Optimize>218 <OutputPath>bin\Debug\</OutputPath>219 <DefineConstants>DEBUG;TRACE</DefineConstants>220 <ErrorReport>prompt</ErrorReport>221 <WarningLevel>4</WarningLevel>222 </PropertyGroup>223 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">224 <PlatformTarget>AnyCPU</PlatformTarget>225 <DebugType>pdbonly</DebugType>226 <Optimize>true</Optimize>227 <OutputPath>bin\Release\</OutputPath>228 <DefineConstants>TRACE</DefineConstants>229 <ErrorReport>prompt</ErrorReport>230 <WarningLevel>4</WarningLevel>231 </PropertyGroup>232 <ItemGroup>233 <Reference Include="System" />234 <Reference Include="System.Core" />235 <Reference Include="System.Xml.Linq" />236 <Reference Include="System.Data.DataSetExtensions" />237 <Reference Include="Microsoft.CSharp" />238 <Reference Include="System.Data" />239 <Reference Include="System.Net.Http" />240 <Reference Include="System.Xml" />241 </ItemGroup>242 <ItemGroup>243 <Compile Include="..\a1\Program.cs">244 <Link>Program.cs</Link>245 </Compile>246 <Compile Include="..\a1\Properties\AssemblyInfo.cs">247 <Link>Properties\AssemblyInfo.cs</Link>248 </Compile>249 </ItemGroup>250 <ItemGroup>251 <None Include="App.config" />252 </ItemGroup>253 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />254</Project>255`256const testProjectContent3a1b = `<?xml version="1.0" encoding="utf-8"?>257<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">258 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />259 <PropertyGroup>260 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>261 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>262 <ProjectGuid>{7DBA74EF-3FCF-422B-B6EC-5EC4849C575A}</ProjectGuid>263 <OutputType>Exe</OutputType>264 <RootNamespace>braces</RootNamespace>265 <AssemblyName>braces</AssemblyName>266 <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>267 <FileAlignment>512</FileAlignment>268 <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>269 <Deterministic>true</Deterministic>270 </PropertyGroup>271 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">272 <PlatformTarget>AnyCPU</PlatformTarget>273 <DebugSymbols>true</DebugSymbols>274 <DebugType>full</DebugType>275 <Optimize>false</Optimize>276 <OutputPath>bin\Debug\</OutputPath>277 <DefineConstants>DEBUG;TRACE</DefineConstants>278 <ErrorReport>prompt</ErrorReport>279 <WarningLevel>4</WarningLevel>280 </PropertyGroup>281 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">282 <PlatformTarget>AnyCPU</PlatformTarget>283 <DebugType>pdbonly</DebugType>284 <Optimize>true</Optimize>285 <OutputPath>bin\Release\</OutputPath>286 <DefineConstants>TRACE</DefineConstants>287 <ErrorReport>prompt</ErrorReport>288 <WarningLevel>4</WarningLevel>289 </PropertyGroup>290 <ItemGroup>291 <Reference Include="System" />292 <Reference Include="System.Core" />293 <Reference Include="System.Xml.Linq" />294 <Reference Include="System.Data.DataSetExtensions" />295 <Reference Include="Microsoft.CSharp" />296 <Reference Include="System.Data" />297 <Reference Include="System.Net.Http" />298 <Reference Include="System.Xml" />299 </ItemGroup>300 <ItemGroup>301 <Compile Include="..\a1\b\Program.cs">302 <Link>Program.cs</Link>303 </Compile>304 <Compile Include="..\a1\b\Properties\AssemblyInfo.cs">305 <Link>Properties\AssemblyInfo.cs</Link>306 </Compile>307 </ItemGroup>308 <ItemGroup>309 <None Include="App.config" />310 </ItemGroup>311 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />312</Project>313`314const appConfigContent = `<?xml version="1.0" encoding="utf-8" ?>315<configuration>316 <startup> 317 <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />318 </startup>319</configuration>320`321const codeFileContent = `322using System;323using System.Collections.Generic;324using System.Linq;325using System.Text;326using System.Threading.Tasks;327namespace a328{329 class Program330 {331 static void Main(string[] args)332 {333 }334 }335}336`337const assemblyInfoContent = `338using System.Reflection;339using System.Runtime.CompilerServices;340using System.Runtime.InteropServices;341// General Information about an assembly is controlled through the following342// set of attributes. Change these attribute values to modify the information343// associated with an assembly.344[assembly: AssemblyTitle("a")]345[assembly: AssemblyDescription("")]346[assembly: AssemblyConfiguration("")]347[assembly: AssemblyCompany("")]348[assembly: AssemblyProduct("a")]349[assembly: AssemblyCopyright("Copyright © 2020")]350[assembly: AssemblyTrademark("")]351[assembly: AssemblyCulture("")]352// Setting ComVisible to false makes the types in this assembly not visible353// to COM components. If you need to access a type in this assembly from354// COM, set the ComVisible attribute to true on that type.355[assembly: ComVisible(false)]356// The following GUID is for the ID of the typelib if this project is exposed to COM357[assembly: Guid("3f69ae61-cc2e-40db-b3ce-77abd9bf327f")]358// Version information for an assembly consists of the following four values:359//360// Major Version361// Minor Version362// Build Number363// Revision364//365// You can specify all the values or you can default the Build and Revision Numbers366// by using the '*' as shown below:367// [assembly: AssemblyVersion("1.0.*")]368[assembly: AssemblyVersion("1.0.0.0")]369[assembly: AssemblyFileVersion("1.0.0.0")]370`371const packagesConfingContent = `<?xml version="1.0" encoding="utf-8"?>372<packages>373 <package id="CmdLine" version="1.0.7.509" targetFramework="net472" />374 <package id="Newtonsoft.Json" version="12.0.1" targetFramework="net472" />375</packages>`376const coreSolutionContent = `377Microsoft Visual Studio Solution File, Format Version 12.00378# Visual Studio Version 16379VisualStudioVersion = 16.0.30717.126380MinimumVisualStudioVersion = 10.0.40219.1381Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "a", "a\a.csproj", "{836F0FC6-D6A9-4EA1-8818-35C9BD545249}"382EndProject383Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "b", "b\b.csproj", "{295171B4-8CD0-4929-A66A-1752395121BA}"384EndProject385Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "c", "c\c.csproj", "{9C13E797-65B5-4CDA-BA15-AE260AAA23C6}"386EndProject387Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "f", "f", "{97E04FD2-B904-46BE-930A-B270D264E83C}"388EndProject389Global390 GlobalSection(SolutionConfigurationPlatforms) = preSolution391 Debug|Any CPU = Debug|Any CPU392 Release|Any CPU = Release|Any CPU393 EndGlobalSection394 GlobalSection(ProjectConfigurationPlatforms) = postSolution395 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Debug|Any CPU.ActiveCfg = Debug|Any CPU396 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Debug|Any CPU.Build.0 = Debug|Any CPU397 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Release|Any CPU.ActiveCfg = Release|Any CPU398 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Release|Any CPU.Build.0 = Release|Any CPU399 {295171B4-8CD0-4929-A66A-1752395121BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU400 {295171B4-8CD0-4929-A66A-1752395121BA}.Debug|Any CPU.Build.0 = Debug|Any CPU401 {295171B4-8CD0-4929-A66A-1752395121BA}.Release|Any CPU.ActiveCfg = Release|Any CPU402 {295171B4-8CD0-4929-A66A-1752395121BA}.Release|Any CPU.Build.0 = Release|Any CPU403 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU404 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Debug|Any CPU.Build.0 = Debug|Any CPU405 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Release|Any CPU.ActiveCfg = Release|Any CPU406 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Release|Any CPU.Build.0 = Release|Any CPU407 EndGlobalSection408 GlobalSection(SolutionProperties) = preSolution409 HideSolutionNode = FALSE410 EndGlobalSection411 GlobalSection(NestedProjects) = preSolution412 {295171B4-8CD0-4929-A66A-1752395121BA} = {97E04FD2-B904-46BE-930A-B270D264E83C}413 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6} = {97E04FD2-B904-46BE-930A-B270D264E83C}414 EndGlobalSection415 GlobalSection(ExtensibilityGlobals) = postSolution416 SolutionGuid = {31AA0C31-1842-4E8E-ADE9-FFE92FD1C22F}417 EndGlobalSection418EndGlobal419`420const coreSolutionContent2 = `421Microsoft Visual Studio Solution File, Format Version 12.00422# Visual Studio Version 16423VisualStudioVersion = 16.0.30717.126424MinimumVisualStudioVersion = 10.0.40219.1425Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "a", "a1\a.csproj", "{836F0FC6-D6A9-4EA1-8818-35C9BD545249}"426EndProject427Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "b", "b1\b.csproj", "{295171B4-8CD0-4929-A66A-1752395121BA}"428EndProject429Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "c", "c\c.csproj", "{9C13E797-65B5-4CDA-BA15-AE260AAA23C6}"430EndProject431Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "f", "f", "{97E04FD2-B904-46BE-930A-B270D264E83C}"432EndProject433Global434 GlobalSection(SolutionConfigurationPlatforms) = preSolution435 Debug|Any CPU = Debug|Any CPU436 Release|Any CPU = Release|Any CPU437 EndGlobalSection438 GlobalSection(ProjectConfigurationPlatforms) = postSolution439 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Debug|Any CPU.ActiveCfg = Debug|Any CPU440 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Debug|Any CPU.Build.0 = Debug|Any CPU441 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Release|Any CPU.ActiveCfg = Release|Any CPU442 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Release|Any CPU.Build.0 = Release|Any CPU443 {295171B4-8CD0-4929-A66A-1752395121BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU444 {295171B4-8CD0-4929-A66A-1752395121BA}.Debug|Any CPU.Build.0 = Debug|Any CPU445 {295171B4-8CD0-4929-A66A-1752395121BA}.Release|Any CPU.ActiveCfg = Release|Any CPU446 {295171B4-8CD0-4929-A66A-1752395121BA}.Release|Any CPU.Build.0 = Release|Any CPU447 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU448 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Debug|Any CPU.Build.0 = Debug|Any CPU449 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Release|Any CPU.ActiveCfg = Release|Any CPU450 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Release|Any CPU.Build.0 = Release|Any CPU451 EndGlobalSection452 GlobalSection(SolutionProperties) = preSolution453 HideSolutionNode = FALSE454 EndGlobalSection455 GlobalSection(NestedProjects) = preSolution456 {295171B4-8CD0-4929-A66A-1752395121BA} = {97E04FD2-B904-46BE-930A-B270D264E83C}457 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6} = {97E04FD2-B904-46BE-930A-B270D264E83C}458 EndGlobalSection459 GlobalSection(ExtensibilityGlobals) = postSolution460 SolutionGuid = {31AA0C31-1842-4E8E-ADE9-FFE92FD1C22F}461 EndGlobalSection462EndGlobal463`464const coreTopSolutionContent = `465Microsoft Visual Studio Solution File, Format Version 12.00466# Visual Studio Version 16467VisualStudioVersion = 16.0.30717.126468MinimumVisualStudioVersion = 10.0.40219.1469Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "a", "a\a\a.csproj", "{836F0FC6-D6A9-4EA1-8818-35C9BD545249}"470EndProject471Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "b", "a\b\b.csproj", "{295171B4-8CD0-4929-A66A-1752395121BA}"472EndProject473Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "c", "a\c\c.csproj", "{9C13E797-65B5-4CDA-BA15-AE260AAA23C6}"474EndProject475Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "f", "f", "{97E04FD2-B904-46BE-930A-B270D264E83C}"476EndProject477Global478 GlobalSection(SolutionConfigurationPlatforms) = preSolution479 Debug|Any CPU = Debug|Any CPU480 Release|Any CPU = Release|Any CPU481 EndGlobalSection482 GlobalSection(ProjectConfigurationPlatforms) = postSolution483 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Debug|Any CPU.ActiveCfg = Debug|Any CPU484 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Debug|Any CPU.Build.0 = Debug|Any CPU485 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Release|Any CPU.ActiveCfg = Release|Any CPU486 {836F0FC6-D6A9-4EA1-8818-35C9BD545249}.Release|Any CPU.Build.0 = Release|Any CPU487 {295171B4-8CD0-4929-A66A-1752395121BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU488 {295171B4-8CD0-4929-A66A-1752395121BA}.Debug|Any CPU.Build.0 = Debug|Any CPU489 {295171B4-8CD0-4929-A66A-1752395121BA}.Release|Any CPU.ActiveCfg = Release|Any CPU490 {295171B4-8CD0-4929-A66A-1752395121BA}.Release|Any CPU.Build.0 = Release|Any CPU491 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU492 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Debug|Any CPU.Build.0 = Debug|Any CPU493 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Release|Any CPU.ActiveCfg = Release|Any CPU494 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6}.Release|Any CPU.Build.0 = Release|Any CPU495 EndGlobalSection496 GlobalSection(SolutionProperties) = preSolution497 HideSolutionNode = FALSE498 EndGlobalSection499 GlobalSection(NestedProjects) = preSolution500 {295171B4-8CD0-4929-A66A-1752395121BA} = {97E04FD2-B904-46BE-930A-B270D264E83C}501 {9C13E797-65B5-4CDA-BA15-AE260AAA23C6} = {97E04FD2-B904-46BE-930A-B270D264E83C}502 EndGlobalSection503 GlobalSection(ExtensibilityGlobals) = postSolution504 SolutionGuid = {31AA0C31-1842-4E8E-ADE9-FFE92FD1C22F}505 EndGlobalSection506EndGlobal507`508const aSdkProjectContent = `<Project Sdk="Microsoft.NET.Sdk">509 <PropertyGroup>510 <OutputType>Exe</OutputType>511 <TargetFramework>netcoreapp3.1</TargetFramework>512 </PropertyGroup>513 <ItemGroup>514 <PackageReference Include="CommandLineParser" Version="2.8.0" />515 </ItemGroup>516 <ItemGroup>517 <ProjectReference Include="..\b\b.csproj" />518 <ProjectReference Include="..\c\c.csproj" />519 </ItemGroup>520</Project>521`522const aSdkProjectContentFullTags = `<Project Sdk="Microsoft.NET.Sdk">523 <PropertyGroup>524 <OutputType>Exe</OutputType>525 <TargetFramework>netcoreapp3.1</TargetFramework>526 </PropertyGroup>527 <ItemGroup>528 <PackageReference Include="CommandLineParser" Version="2.8.0" />529 </ItemGroup>530 <ItemGroup>531 <ProjectReference Include="..\b\b.csproj"></ProjectReference>532 <ProjectReference Include="..\c\c.csproj"></ProjectReference>533 </ItemGroup>534</Project>535`536const aSdkProjectContentFullTagsNoRedundant = `<Project Sdk="Microsoft.NET.Sdk">537 <PropertyGroup>538 <OutputType>Exe</OutputType>539 <TargetFramework>netcoreapp3.1</TargetFramework>540 </PropertyGroup>541 <ItemGroup>542 <PackageReference Include="CommandLineParser" Version="2.8.0" />543 </ItemGroup>544 <ItemGroup>545 <ProjectReference Include="..\c\c.csproj"></ProjectReference>546 </ItemGroup>547</Project>548`549const aSdkProjectContentWithoutRedundantRefs = `<Project Sdk="Microsoft.NET.Sdk">550 <PropertyGroup>551 <OutputType>Exe</OutputType>552 <TargetFramework>netcoreapp3.1</TargetFramework>553 </PropertyGroup>554 <ItemGroup>555 <PackageReference Include="CommandLineParser" Version="2.8.0" />556 </ItemGroup>557 <ItemGroup>558 <ProjectReference Include="..\c\c.csproj" />559 </ItemGroup>560</Project>561`562const bSdkProjectContent = `<Project Sdk="Microsoft.NET.Sdk">563 <PropertyGroup>564 <TargetFramework>netstandard2.0</TargetFramework>565 </PropertyGroup>566</Project>567`568const bSdkProjectWithNugetContent = `<Project Sdk="Microsoft.NET.Sdk">569 <PropertyGroup>570 <TargetFramework>netstandard2.0</TargetFramework>571 </PropertyGroup>572 <ItemGroup>573 <PackageReference Include="CommandLineParser" Version="2.7.0" />574 </ItemGroup>575</Project>576`577const cSdkProjectContent = `<Project Sdk="Microsoft.NET.Sdk">578 <PropertyGroup>579 <TargetFramework>netstandard2.0</TargetFramework>580 </PropertyGroup>581 <ItemGroup>582 <ProjectReference Include="..\b\b.csproj" />583 </ItemGroup>584</Project>585`...

Full Screen

Full Screen

util_test.go

Source:util_test.go Github

copy

Full Screen

1package msvc2import (3 "bytes"4 "github.com/spf13/afero"5 "github.com/stretchr/testify/assert"6 "solt/internal/sys"7 "strings"8 "testing"9)10func TestUnmarshalXML_PackagesConfig(t *testing.T) {11 // Arrange12 ass := assert.New(t)13 packages := packages{}14 const packangesconfig = `15<?xml version="1.0" encoding="utf-8"?>16<packages>17 <package id="YaccLexTools" version="0.2.2" targetFramework="net45" />18</packages>19`20 out := bytes.NewBuffer(nil)21 d := sys.NewXMLDecoder(out)22 r := strings.NewReader(packangesconfig)23 // Act24 _ = d.Unmarshal(r, &packages)25 // Assert26 ass.Equal(1, len(packages.Packages))27 ass.Equal("YaccLexTools", packages.Packages[0].ID)28 ass.Equal("0.2.2", packages.Packages[0].Version)29 ass.Equal("net45", packages.Packages[0].TargetFramework)30}31func Test_unmarshalXMLFrom_UnexistFile(t *testing.T) {32 // Arrange33 ass := assert.New(t)34 memfs := afero.NewMemMapFs()35 packages := packages{}36 out := bytes.NewBuffer(nil)37 d := sys.NewXMLDecoder(out)38 // Act39 err := d.UnmarshalFrom("unexit", memfs, &packages)40 // Assert41 ass.Error(err)42}43func TestUnmarshalXML_MsbuildProject(t *testing.T) {44 // Arrange45 ass := assert.New(t)46 prj := msbuildProject{}47 const project = `48<?xml version="1.0" encoding="utf-8"?>49<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">50 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />51 <PropertyGroup>52 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>53 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>54 <ProjectGuid>{99B7AE2B-EF73-48A6-BBE1-ACF5E0CA569D}</ProjectGuid>55 <OutputType>Exe</OutputType>56 <RootNamespace>sort</RootNamespace>57 <AssemblyName>sort</AssemblyName>58 <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>59 <FileAlignment>512</FileAlignment>60 <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>61 <Deterministic>true</Deterministic>62 </PropertyGroup>63 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">64 <PlatformTarget>AnyCPU</PlatformTarget>65 <DebugSymbols>true</DebugSymbols>66 <DebugType>full</DebugType>67 <Optimize>false</Optimize>68 <OutputPath>bin\Debug\</OutputPath>69 <DefineConstants>DEBUG;TRACE</DefineConstants>70 <ErrorReport>prompt</ErrorReport>71 <WarningLevel>4</WarningLevel>72 <AllowUnsafeBlocks>true</AllowUnsafeBlocks>73 </PropertyGroup>74 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">75 <PlatformTarget>AnyCPU</PlatformTarget>76 <DebugType>pdbonly</DebugType>77 <Optimize>true</Optimize>78 <OutputPath>bin\Release\</OutputPath>79 <DefineConstants>TRACE</DefineConstants>80 <ErrorReport>prompt</ErrorReport>81 <WarningLevel>4</WarningLevel>82 <AllowUnsafeBlocks>true</AllowUnsafeBlocks>83 </PropertyGroup>84 <ItemGroup>85 <Reference Include="System" />86 <Reference Include="System.Core" />87 <Reference Include="System.Xml.Linq" />88 <Reference Include="System.Data.DataSetExtensions" />89 <Reference Include="Microsoft.CSharp" />90 <Reference Include="System.Data" />91 <Reference Include="System.Net.Http" />92 <Reference Include="System.Xml" />93 </ItemGroup>94 <ItemGroup>95 <Compile Include="Program.cs" />96 <Compile Include="Properties\AssemblyInfo.cs" />97 </ItemGroup>98 <ItemGroup>99 <None Include="App.config" />100 </ItemGroup>101 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />102</Project>103`104 r := strings.NewReader(project)105 out := bytes.NewBuffer(nil)106 d := sys.NewXMLDecoder(out)107 // Act108 _ = d.Unmarshal(r, &prj)109 // Assert110 ass.Equal(2, len(prj.Compiles))111 ass.Equal(1, len(prj.Nones))112 ass.Equal("{99B7AE2B-EF73-48A6-BBE1-ACF5E0CA569D}", prj.ID)113 ass.Equal(8, len(prj.References))114}...

Full Screen

Full Screen

defineConstants

Using AI Code Generation

copy

Full Screen

1import "fmt"2import "net/http"3func main() {4fmt.Println(http.MethodGet)5fmt.Println(http.MethodHead)6fmt.Println(http.MethodPost)7fmt.Println(http.MethodPut)8fmt.Println(http.MethodPatch)9fmt.Println(http.MethodDelete)10fmt.Println(http.MethodConnect)11fmt.Println(http.MethodOptions)12fmt.Println(http.MethodTrace)13}14type Client struct {

Full Screen

Full Screen

defineConstants

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fmt.Println(http.CanonicalHeaderKey("Accept"))4 fmt.Println(http.CanonicalHeaderKey("Accept-Charset"))5 fmt.Println(http.CanonicalHeaderKey("Accept-Encoding"))6 fmt.Println(http.CanonicalHeaderKey("Accept-Language"))7 fmt.Println(http.CanonicalHeaderKey("Accept-Ranges"))8 fmt.Println(http.CanonicalHeaderKey("Access-Control-Allow-Origin"))9 fmt.Println(http.CanonicalHeaderKey("Age"))10 fmt.Println(http.CanonicalHeaderKey("Allow"))11 fmt.Println(http.CanonicalHeaderKey("Authorization"))12 fmt.Println(http.CanonicalHeaderKey("Cache-Control"))13 fmt.Println(http.CanonicalHeaderKey("Connection"))14 fmt.Println(http.CanonicalHeaderKey("Content-Disposition"))15 fmt.Println(http.CanonicalHeaderKey("Content-Encoding"))16 fmt.Println(http.CanonicalHeaderKey("Content-Language"))17 fmt.Println(http.CanonicalHeaderKey("Content-Length"))18 fmt.Println(http.CanonicalHeaderKey("Content-Location"))19 fmt.Println(http.CanonicalHeaderKey("Content-MD5"))20 fmt.Println(http.CanonicalHeaderKey("Content-Range"))21 fmt.Println(http.CanonicalHeaderKey("Content-Security-Policy"))22 fmt.Println(http.CanonicalHeaderKey("Content-Type"))23 fmt.Println(http.CanonicalHeaderKey("Cookie"))24 fmt.Println(http.CanonicalHeaderKey("Date"))25 fmt.Println(http.CanonicalHeaderKey("ETag"))26 fmt.Println(http.CanonicalHeaderKey("Expect"))27 fmt.Println(http.CanonicalHeaderKey("Expires"))28 fmt.Println(http.CanonicalHeaderKey("Forwarded"))29 fmt.Println(http.CanonicalHeaderKey("From"))30 fmt.Println(http.CanonicalHeaderKey("Host"))31 fmt.Println(http.CanonicalHeaderKey("If-Match"))32 fmt.Println(http.CanonicalHeaderKey("If-Modified-Since"))33 fmt.Println(http.CanonicalHeaderKey("If-None-Match"))34 fmt.Println(http.CanonicalHeaderKey("If-Range"))35 fmt.Println(http.CanonicalHeaderKey("If-Unmodified-Since"))36 fmt.Println(http.CanonicalHeaderKey("Last-Modified"))37 fmt.Println(http.CanonicalHeaderKey("Link"))38 fmt.Println(http.CanonicalHeaderKey("Location"))39 fmt.Println(http.CanonicalHeaderKey("Max-Forwards"))40 fmt.Println(http.CanonicalHeaderKey("Origin"))41 fmt.Println(http.CanonicalHeaderKey("Pragma"))

Full Screen

Full Screen

defineConstants

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fmt.Println(http.StatusContinue)4 fmt.Println(http.StatusSwitchingProtocols)5 fmt.Println(http.StatusOK)6 fmt.Println(http.StatusCreated)7 fmt.Println(http.StatusAccepted)8 fmt.Println(http.StatusNonAuthoritativeInfo)9 fmt.Println(http.StatusNoContent)10 fmt.Println(http.StatusResetContent)11 fmt.Println(http.StatusPartialContent)12 fmt.Println(http.StatusMultipleChoices)13 fmt.Println(http.StatusMovedPermanently)14 fmt.Println(http.StatusFound)15 fmt.Println(http.StatusSeeOther)16 fmt.Println(http.StatusNotModified)17 fmt.Println(http.StatusUseProxy)18 fmt.Println(http.StatusTemporaryRedirect)19 fmt.Println(http.StatusBadRequest)20 fmt.Println(http.StatusUnauthorized)21 fmt.Println(http.StatusPaymentRequired)22 fmt.Println(http.StatusForbidden)23 fmt.Println(http.StatusNotFound)24 fmt.Println(http.StatusMethodNotAllowed)25 fmt.Println(http.StatusNotAcceptable)26 fmt.Println(http.StatusProxyAuthRequired)27 fmt.Println(http.StatusRequestTimeout)28 fmt.Println(http.StatusConflict)29 fmt.Println(http.StatusGone)30 fmt.Println(http.StatusLengthRequired)31 fmt.Println(http.StatusPreconditionFailed)32 fmt.Println(http.StatusRequestEntityTooLarge)33 fmt.Println(http.StatusRequestURITooLong)34 fmt.Println(http.StatusUnsupportedMediaType)35 fmt.Println(http.StatusRequestedRangeNotSatisfiable)36 fmt.Println(http.StatusExpectationFailed)37 fmt.Println(http.StatusTeapot)38 fmt.Println(http.StatusInternalServerError)39 fmt.Println(http.StatusNotImplemented)40 fmt.Println(http.StatusBadGateway)41 fmt.Println(http.StatusServiceUnavailable)42 fmt.Println(http.StatusGatewayTimeout)43 fmt.Println(http.StatusHTTPVersionNotSupported)44 fmt.Println(http.StatusNetworkAuthenticationRequired)45}

Full Screen

Full Screen

defineConstants

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fmt.Println(http.StatusContinue)4 fmt.Println(http.StatusSwitchingProtocols)5 fmt.Println(http.StatusProcessing)6 fmt.Println(http.StatusOK)7 fmt.Println(http.StatusCreated)8 fmt.Println(http.StatusAccepted)9 fmt.Println(http.StatusNonAuthoritativeInfo)10 fmt.Println(http.StatusNoContent)11 fmt.Println(http.StatusResetContent)12 fmt.Println(http.StatusPartialContent)13 fmt.Println(http.StatusMultiStatus)14 fmt.Println(http.StatusAlreadyReported)15 fmt.Println(http.StatusIMUsed)16 fmt.Println(http.StatusMultipleChoices)17 fmt.Println(http.StatusMovedPermanently)18 fmt.Println(http.StatusFound)19 fmt.Println(http.StatusSeeOther)20 fmt.Println(http.StatusNotModified)21 fmt.Println(http.StatusUseProxy)22 fmt.Println(http.StatusTemporaryRedirect)23 fmt.Println(http.StatusPermanentRedirect)24 fmt.Println(http.StatusBadRequest)25 fmt.Println(http.StatusUnauthorized)26 fmt.Println(http.StatusPaymentRequired)27 fmt.Println(http.StatusForbidden)28 fmt.Println(http.StatusNotFound)29 fmt.Println(http.StatusMethodNotAllowed)30 fmt.Println(http.StatusNotAcceptable)31 fmt.Println(http.StatusProxyAuthRequired)32 fmt.Println(http.StatusRequestTimeout)33 fmt.Println(http.StatusConflict)34 fmt.Println(http.StatusGone)35 fmt.Println(http.StatusLengthRequired)36 fmt.Println(http.StatusPreconditionFailed)37 fmt.Println(http.StatusRequestEntityTooLarge)38 fmt.Println(http.StatusRequestURITooLong)39 fmt.Println(http.StatusUnsupportedMediaType)40 fmt.Println(http.StatusRequestedRangeNotSatisfiable)41 fmt.Println(http.StatusExpectationFailed)42 fmt.Println(http.StatusTeapot)43 fmt.Println(http.StatusUnprocessableEntity)44 fmt.Println(http.StatusLocked)45 fmt.Println(http.StatusFailedDependency)46 fmt.Println(http.StatusUpgradeRequired)47 fmt.Println(http.StatusPreconditionRequired)48 fmt.Println(http.StatusTooManyRequests)49 fmt.Println(http.StatusRequestHeaderFieldsTooLarge)50 fmt.Println(http.StatusUnavailableForLegalReasons)51 fmt.Println(http.StatusInternalServerError)52 fmt.Println(http.StatusNotImplemented)53 fmt.Println(http.StatusBadGateway)54 fmt.Println(http.StatusServiceUnavailable)55 fmt.Println(http.StatusGatewayTimeout)56 fmt.Println(http.StatusHTTPVersionNotSupported)57 fmt.Println(http.StatusVariantAlsoNegotiates)58 fmt.Println(http.StatusInsufficientStorage)59 fmt.Println(http.StatusLoopDetected)60 fmt.Println(http.StatusNotExtended)61 fmt.Println(http.StatusNetworkAuthenticationRequired)62}

Full Screen

Full Screen

defineConstants

Using AI Code Generation

copy

Full Screen

1import (2func main() {3 fmt.Println(http.MethodGet)4 fmt.Println(http.MethodPost)5 fmt.Println(http.MethodPut)6 fmt.Println(http.MethodPatch)7 fmt.Println(http.MethodDelete)8 fmt.Println(http.MethodConnect)9 fmt.Println(http.MethodHead)10 fmt.Println(http.MethodOptions)11 fmt.Println(http.MethodTrace)12}13Recommended Posts: Golang | net/http package | http.ListenAndServe() method14Golang | net/http package | http.Get() method15Golang | net/http package | http.NewRequest() method16Golang | net/http package | http.Post() method17Golang | net/http package | http.PostForm() method18Golang | net/http package | http.FileServer() method19Golang | net/http package | http.Redirect() method20Golang | net/http package | http.ServeFile() method21Golang | net/http package | http.ServeContent() method22Golang | net/http package | http.Serve() method23Golang | net/http package | http.ListenAndServeTLS() method24Golang | net/http package | http.ListenAndServe() method

Full Screen

Full Screen

defineConstants

Using AI Code Generation

copy

Full Screen

1import "ballerina/http";2import "ballerina/io";3import ballerina/runtime;4import ballerina/log;5public function main() {6 defineConstants();7 var response = clientEndpoint->get("/hello");8 match response {9 http:Response res => {10 io:println("Response: ", res);11 io:println("Get Payload: ", res.getPayload());12 io:println("Status Code: ", res.statusCode);13 io:println("Status Phrase: ", res.reasonPhrase);14 }15 error err => io:println("Error: ", err.message);16 }17}18function defineConstants() {19 runtime:defineConstant("foo", "bar");20 runtime:defineConstant("foo1", "bar1");21 runtime:defineConstant("foo2", "bar2");22 runtime:defineConstant("foo3", "bar3");23 runtime:defineConstant("foo4", "bar4");24}25import "ballerina/http";26import "ballerina/io";27import ballerina/runtime;28import ballerina/log;29public function main() {30 defineConstants();31 var response = clientEndpoint->get("/hello");32 match response {33 http:Response res => {34 io:println("Response: ", res);35 io:println("Get Payload: ", res.getPayload());36 io:println("Status Code: ", res.statusCode);37 io:println("Status Phrase: ", res.reasonPhrase);38 }39 error err => io:println("Error: ", err.message);40 }41}42function defineConstants() {43 runtime:defineConstant("foo", "bar");44 runtime:defineConstant("foo1", "bar1");45 runtime:defineConstant("foo2", "bar2");46 runtime:defineConstant("foo3", "bar3");47 runtime:defineConstant("foo4", "bar4");48}49import "ballerina/http";50import "ballerina/io";51import ballerina

Full Screen

Full Screen

defineConstants

Using AI Code Generation

copy

Full Screen

1import "net/http"2func main() {3 http.DefineConstants()4 fmt.Println("HTTP Status OK: ", http.StatusOK)5 fmt.Println("HTTP Status Created: ", http.StatusCreated)6 fmt.Println("HTTP Status Accepted: ", http.StatusAccepted)7 fmt.Println("HTTP Status NoContent: ", http.StatusNoContent)8 fmt.Println("HTTP Status BadRequest: ", http.StatusBadRequest)9 fmt.Println("HTTP Status Unauthorized: ", http.StatusUnauthorized)10 fmt.Println("HTTP Status Forbidden: ", http.StatusForbidden)11 fmt.Println("HTTP Status NotFound: ", http.StatusNotFound)12}

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful