Commit 23409b3e 23409b3e25089eb5ddb331e9f86c7412e04b0775 by Christian Gerdes

Merge with master (solved conflicts)

2 parents eb1b7ec9 c6aec8c3
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
13 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 13 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14 <FileAlignment>512</FileAlignment> 14 <FileAlignment>512</FileAlignment>
15 <TargetFrameworkProfile /> 15 <TargetFrameworkProfile />
16 <SccProjectName>SAK</SccProjectName>
17 <SccLocalPath>SAK</SccLocalPath>
18 <SccAuxPath>SAK</SccAuxPath>
19 <SccProvider>SAK</SccProvider>
16 </PropertyGroup> 20 </PropertyGroup>
17 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> 21 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18 <DebugSymbols>true</DebugSymbols> 22 <DebugSymbols>true</DebugSymbols>
...@@ -1499,6 +1503,7 @@ ...@@ -1499,6 +1503,7 @@
1499 <Compile Include="BouncyCastle_src\x509\X509V2AttributeCertificateGenerator.cs" /> 1503 <Compile Include="BouncyCastle_src\x509\X509V2AttributeCertificateGenerator.cs" />
1500 <Compile Include="BouncyCastle_src\x509\X509V2CRLGenerator.cs" /> 1504 <Compile Include="BouncyCastle_src\x509\X509V2CRLGenerator.cs" />
1501 <Compile Include="BouncyCastle_src\x509\X509V3CertificateGenerator.cs" /> 1505 <Compile Include="BouncyCastle_src\x509\X509V3CertificateGenerator.cs" />
1506 <Compile Include="Skv.cs" />
1502 <Compile Include="ValidationRules.cs" /> 1507 <Compile Include="ValidationRules.cs" />
1503 <Compile Include="ExtractionRules.cs" /> 1508 <Compile Include="ExtractionRules.cs" />
1504 <Compile Include="Beta.cs" /> 1509 <Compile Include="Beta.cs" />
......
1 ""
2 {
3 "FILE_VERSION" = "9237"
4 "ENLISTMENT_CHOICE" = "NEVER"
5 "PROJECT_FILE_RELATIVE_PATH" = ""
6 "NUMBER_OF_EXCLUDED_FILES" = "0"
7 "ORIGINAL_PROJECT_FILE_PATH" = ""
8 "NUMBER_OF_NESTED_PROJECTS" = "0"
9 "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 }
1 /* Skatteverkets plugins
2 (C) Skatteverket Svenska STATEN!!!
3 */
4
5 using System;
6 using System.Collections.Generic;
7 using System.Linq;
8 using System.Text;
9 using System.Threading.Tasks;
10 using Microsoft.VisualStudio.TestTools.WebTesting;
11 using System.ComponentModel;
12
13 namespace LIL_VSTT_Plugins
14 {
15 [DisplayName("Validera Header")]
16 [Description("(C) Mårten\r\nValiderar att en header har ett visst värde i svaret.")]
17 public class ValidateHeader : ValidationRule
18 {
19 [DisplayName("Header Namn"), DefaultValue(""), Description("Namnet på headern i svaret")]
20 public string HeaderName { get; set; }
21
22 [DisplayName("Värde"), DefaultValue(""), Description("Värdet som headern ska ha")]
23 public string HeaderValue { get; set; }
24
25 public override void Validate(object sender, ValidationEventArgs e)
26 {
27 e.IsValid = false;
28 e.Message = "Default triggades. False! Check the code!!";
29 if (e.Response.Headers[HeaderName] == HeaderValue)
30 {
31 e.IsValid = true;
32 e.Message = "Hittade header " + HeaderName + " med värde " + HeaderValue;
33 } else
34 {
35 e.IsValid = false;
36 e.Message = "Hittande ingen header med namnet " + HeaderName + " och värdet " + HeaderValue;
37 }
38 }
39 }
40 }
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <WebTest Name="WebTest8" Id="bac430ba-6ffc-4989-a29b-d9425412a248" Owner="" Priority="2147483647" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale=""> 2 <WebTest Name="WebTest8" Id="bac430ba-6ffc-4989-a29b-d9425412a248" Owner="" Priority="2147483647" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale="">
3 <Items> 3 <Items>
4 <Request Method="GET" Guid="98c3ac11-a7d8-4267-ad44-075ad706a99b" Version="1.1" Url="http://na28133.rsva.se:8080/SiteScope/servlet/Main" ThinkTime="1" Timeout="300" ParseDependentRequests="False" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False" /> 4 <Request Method="GET" Guid="98c3ac11-a7d8-4267-ad44-075ad706a99b" Version="1.1" Url="http://www.skatteverket.se/" ThinkTime="1" Timeout="300" ParseDependentRequests="False" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
5 <ValidationRules>
6 <ValidationRule Classname="LIL_VSTT_Plugins.ValidateHeader, LIL_VSTT_Plugins, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null" DisplayName="Validera Header" Description="(C) Mårten&#xD;&#xA;Validerar att en header har ett visst värde i svaret." Level="High" ExectuionOrder="BeforeDependents">
7 <RuleParameters>
8 <RuleParameter Name="HeaderName" Value="Server" />
9 <RuleParameter Name="HeaderValue" Value="Apache-Coyote/1.1" />
10 </RuleParameters>
11 </ValidationRule>
12 </ValidationRules>
13 </Request>
5 </Items> 14 </Items>
6 </WebTest> 15 </WebTest>
...\ No newline at end of file ...\ No newline at end of file
......