Skip to content

Commit d230739

Browse files
committed
tests package
1 parent 0ab78e5 commit d230739

File tree

6 files changed

+63
-35
lines changed

6 files changed

+63
-35
lines changed

ExampleWebBasic.csproj

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,27 @@
4343
<WarningLevel>4</WarningLevel>
4444
</PropertyGroup>
4545
<ItemGroup>
46+
<Reference Include="Desharp, Version=1.3.0.0, Culture=neutral, PublicKeyToken=cd60d985c52bcd6f, processorArchitecture=MSIL">
47+
<HintPath>..\packages\Desharp.1.3.0\lib\net40\Desharp.dll</HintPath>
48+
<Private>True</Private>
49+
</Reference>
50+
<Reference Include="Desharp.Tests, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
51+
<HintPath>..\packages\Desharp.Tests.1.3.0\lib\net40\Desharp.Tests.dll</HintPath>
52+
<Private>True</Private>
53+
</Reference>
4654
<Reference Include="Microsoft.CSharp" />
4755
<Reference Include="System" />
56+
<Reference Include="System.Configuration" />
4857
<Reference Include="System.Core" />
58+
<Reference Include="System.Data" />
59+
<Reference Include="System.Data.DataSetExtensions" />
4960
<Reference Include="System.Net.Http.WebRequest" />
61+
<Reference Include="System.Runtime.Serialization" />
5062
<Reference Include="System.Web" />
63+
<Reference Include="System.Web.Extensions" />
5164
</ItemGroup>
5265
<ItemGroup>
66+
<Content Include="custom-server-error-page.html" />
5367
<Content Include="Global.asax" />
5468
<Content Include="Index.aspx" />
5569
<Content Include="Web.config" />
@@ -61,14 +75,7 @@
6175
<Compile Include="Properties\AssemblyInfo.cs" />
6276
</ItemGroup>
6377
<ItemGroup>
64-
<ProjectReference Include="..\..\..\cs\desharp\desharp\Desharp.csproj">
65-
<Project>{4f63d16b-a1e9-45a9-ac2f-831a1220b2b9}</Project>
66-
<Name>Desharp</Name>
67-
</ProjectReference>
68-
<ProjectReference Include="..\tests\Tests.csproj">
69-
<Project>{986c7801-a810-456d-8d5a-c70319717191}</Project>
70-
<Name>Tests</Name>
71-
</ProjectReference>
78+
<Content Include="packages.config" />
7279
</ItemGroup>
7380
<PropertyGroup>
7481
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

Global.asax.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private void _demoHandleAllRequests () {
8686
// - always logged automatically in non-debug mode:
8787
throw new Exception("Global request error.", ex);
8888
}
89-
89+
9090
// Run some test dumps:
9191
//this._runDumpingTests();
9292
//this._runExceptionsTests();
@@ -157,13 +157,13 @@ private void _demoUncatchedException () {
157157

158158
// Run test dumps:
159159
private void _runDumpingTests () {
160-
var dlTest = new Tests.DumpingAndLoging();
160+
var dlTest = new Desharp.Tests.DumpingAndLoging();
161161
dlTest.TestAll();
162162
}
163163

164164
// Run test exceptions rendering:
165165
private void _runExceptionsTests () {
166-
var eTest = new Tests.ExceptionsRendering();
166+
var eTest = new Desharp.Tests.ExceptionsRendering();
167167
eTest.TestAll();
168168
}
169169
}

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
[assembly: AssemblyVersion("1.3.0.0")]
36+
[assembly: AssemblyFileVersion("1.3.0.0")]

Web.config

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<!--
33
For more information on how to configure your ASP.NET application, please visit
44
https://go.microsoft.com/fwlink/?LinkId=169433
55
-->
66
<configuration>
77

88
<system.web>
9-
<authentication mode="None" />
10-
<compilation debug="true" targetFramework="4.5" />
11-
<httpRuntime targetFramework="4.5" />
12-
<customErrors mode="Off" />
9+
<authentication mode="None"/>
10+
<compilation debug="true" targetFramework="4.5"/>
11+
<httpRuntime targetFramework="4.5"/>
12+
<customErrors mode="Off"/>
1313
<sessionState mode="InProc" timeout="525600" cookieless="UseCookies" cookieName="ASP.NET_SessionId" regenerateExpiredSessionId="true">
1414
<providers>
15-
<clear />
15+
<clear/>
1616
</providers>
1717
</sessionState>
1818
</system.web>
1919

2020
<appSettings>
21-
<add key="Desharp:Enabled" value="1" />
22-
<add key="Desharp:Output" value="html" />
21+
<add key="Desharp:Enabled" value="1"/>
22+
<add key="Desharp:Output" value="html"/>
2323
<!--add key="Desharp:DebugIps" value="127.0.0.1,::1" /-->
24-
<add key="Desharp:Levels" value="+exception,debug,info,-notice,-warning,+error,+critical,alert,+emergency,javascript" />
25-
<add key="Desharp:Panels" value="Desharp.Panels.SystemInfo,Desharp.Panels.Session" />
26-
<add key="Desharp:Directory" value="~/logs" />
27-
<add key="Desharp:Editor" value="MSVS2015" />
24+
<add key="Desharp:Levels" value="+exception,debug,info,-notice,-warning,+error,+critical,alert,+emergency,javascript"/>
25+
<add key="Desharp:Panels" value="Desharp.Panels.SystemInfo,Desharp.Panels.Session"/>
26+
<add key="Desharp:Directory" value="~/Logs"/>
27+
<add key="Desharp:ErrorPage" value="~/custom-server-error-page.html"/>
2828
</appSettings>
2929

3030
<system.webServer>
@@ -44,42 +44,42 @@
4444
<remove name="UrlRoutingModule-4.0"/>
4545
<remove name="ScriptModule-4.0"/>
4646
<!-- https://docs.microsoft.com/en-us/iis/configuration/system.webserver/modules/add -->
47-
<add name="Desharp" type="Desharp.Module" preCondition="managedHandler" />
47+
<add name="Desharp" type="Desharp.Module" preCondition="managedHandler"/>
4848
</modules>
49-
<caching enabled="false" enableKernelCache="false" />
50-
<directoryBrowse enabled="false" />
49+
<caching enabled="false" enableKernelCache="false"/>
50+
<directoryBrowse enabled="false"/>
5151

5252
<security>
5353
<requestFiltering>
5454
<hiddenSegments>
55-
<add segment="logs" />
56-
<add segment="Desharp.config.example" />
55+
<add segment="Desharp.config.example"/>
56+
<add segment="Logs"/>
5757
</hiddenSegments>
5858
</requestFiltering>
5959
</security>
6060

6161
<rewrite>
6262
<rules>
6363
<rule name="All to empty Index.aspx to handle everything in Global.aspx" enabled="true" stopProcessing="true">
64-
<match url="(.*)" />
64+
<match url="(.*)"/>
6565
<conditions logicalGrouping="MatchAll">
6666
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
6767
</conditions>
68-
<action type="Rewrite" url="Index.aspx?{R:1}" />
68+
<action type="Rewrite" url="Index.aspx?{R:1}"/>
6969
</rule>
7070
</rules>
7171
</rewrite>
7272

73-
<httpErrors errorMode="Detailed" />
73+
<httpErrors errorMode="Detailed"/>
7474

7575
<staticContent>
76-
<mimeMap fileExtension=".md" mimeType="text/x-markdown" />
76+
<mimeMap fileExtension=".md" mimeType="text/x-markdown"/>
7777
</staticContent>
7878

7979
</system.webServer>
8080

8181
<runtime>
82-
<loadFromRemoteSources enabled="true" />
82+
<loadFromRemoteSources enabled="true"/>
8383
</runtime>
8484

8585
</configuration>

custom-server-error-page.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title></title>
5+
<meta charset="utf-8" />
6+
<style>
7+
html,body{font-family:Arial,Arial,Helvetica,sans-serif;font-size:30px;text-align:center;display:table;width:100%;height:100%;overflow:hidden;vertical-align:middle;margin:0;background:#333;color:#fff;}
8+
body{display:table-cell;padding-bottom:15%;}
9+
</style>
10+
</head>
11+
<body align="center">
12+
<h1>Error 500</h1>
13+
<p>Any custom text.</p>
14+
</body>
15+
</html>

packages.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Desharp" version="1.3.0" targetFramework="net45" />
4+
<package id="Desharp.Tests" version="1.3.0" targetFramework="net45" />
5+
<package id="Microsoft.CodeAnalysis" version="3.2.1" targetFramework="net45" />
6+
</packages>

0 commit comments

Comments
 (0)