Skip to content

Commit a1b5159

Browse files
Updating tests
1 parent c155127 commit a1b5159

File tree

10 files changed

+43
-96
lines changed

10 files changed

+43
-96
lines changed

SendGrid/SendGrid.sln

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mail", "SendGridMail\Mail.c
2020
EndProject
2121
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SendGrid", "SendGrid\SendGrid.csproj", "{1C318867-440B-4EB9-99E3-C0CC2C556962}"
2222
EndProject
23+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTest\UnitTests.csproj", "{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}"
24+
EndProject
2325
Global
2426
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2527
BuildNet45|Any CPU = BuildNet45|Any CPU
@@ -51,15 +53,12 @@ Global
5153
{0319E73A-7039-4858-B047-1EDF88BB6BD1}.Release|x86.ActiveCfg = Release|Any CPU
5254
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.BuildNet45|Any CPU.ActiveCfg = BuildNet45|Any CPU
5355
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.BuildNet45|Mixed Platforms.ActiveCfg = Debug|Any CPU
54-
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.BuildNet45|Mixed Platforms.Build.0 = Debug|Any CPU
5556
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.BuildNet45|x86.ActiveCfg = BuildNet45|Any CPU
5657
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
5758
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
58-
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
5959
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.Debug|x86.ActiveCfg = Debug|Any CPU
6060
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
6161
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.Release|Mixed Platforms.ActiveCfg = Debug|Any CPU
62-
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.Release|Mixed Platforms.Build.0 = Debug|Any CPU
6362
{F39ADCE7-63B5-406D-9BE8-C407920B6B8F}.Release|x86.ActiveCfg = Release|Any CPU
6463
{3C687BEF-FF50-44AD-8315-2D4237281AF8}.BuildNet45|Any CPU.ActiveCfg = BuildNet45|Any CPU
6564
{3C687BEF-FF50-44AD-8315-2D4237281AF8}.BuildNet45|Any CPU.Build.0 = BuildNet45|Any CPU
@@ -95,6 +94,24 @@ Global
9594
{1C318867-440B-4EB9-99E3-C0CC2C556962}.Release|Mixed Platforms.Build.0 = Debug|Any CPU
9695
{1C318867-440B-4EB9-99E3-C0CC2C556962}.Release|x86.ActiveCfg = Release|Any CPU
9796
{1C318867-440B-4EB9-99E3-C0CC2C556962}.Release|x86.Build.0 = Release|Any CPU
97+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.BuildNet45|Any CPU.ActiveCfg = Release|Any CPU
98+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.BuildNet45|Any CPU.Build.0 = Release|Any CPU
99+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.BuildNet45|Mixed Platforms.ActiveCfg = Release|Any CPU
100+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.BuildNet45|Mixed Platforms.Build.0 = Release|Any CPU
101+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.BuildNet45|x86.ActiveCfg = Release|Any CPU
102+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.BuildNet45|x86.Build.0 = Release|Any CPU
103+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
104+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
105+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
106+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
107+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Debug|x86.ActiveCfg = Debug|Any CPU
108+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Debug|x86.Build.0 = Debug|Any CPU
109+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
110+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Release|Any CPU.Build.0 = Release|Any CPU
111+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
112+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
113+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Release|x86.ActiveCfg = Release|Any CPU
114+
{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}.Release|x86.Build.0 = Release|Any CPU
98115
EndGlobalSection
99116
GlobalSection(SolutionProperties) = preSolution
100117
HideSolutionNode = FALSE

SendGrid/Tests/Resources/TestApiKeys.cs

Lines changed: 0 additions & 73 deletions
This file was deleted.

SendGrid/Tests/Tests.csproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
</PropertyGroup>
5151
<ItemGroup>
5252
<Reference Include="Microsoft.CSharp" />
53+
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
5354
<Reference Include="Moq">
5455
<HintPath>..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll</HintPath>
5556
</Reference>
@@ -69,13 +70,14 @@
6970
</ItemGroup>
7071
<ItemGroup>
7172
<Compile Include="Properties\AssemblyInfo.cs" />
72-
<Compile Include="Resources\TestApiKeys.cs" />
7373
<Compile Include="TestSendgrid.cs" />
7474
<Compile Include="Transport\TestErrorChecker.cs" />
7575
<Compile Include="Transport\TestWebApi.cs" />
7676
</ItemGroup>
7777
<ItemGroup>
78-
<None Include="app.config" />
78+
<None Include="app.config">
79+
<SubType>Designer</SubType>
80+
</None>
7981
<None Include="packages.config">
8082
<SubType>Designer</SubType>
8183
</None>
@@ -91,6 +93,9 @@
9193
<Name>SendGrid</Name>
9294
</ProjectReference>
9395
</ItemGroup>
96+
<ItemGroup>
97+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
98+
</ItemGroup>
9499
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
95100
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
96101
</Project>

SendGrid/Tests/Transport/TestWebApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using NUnit.Framework;
88
using SendGrid;
99

10-
namespace Tests.Transport
10+
namespace Transport
1111
{
1212
[TestFixture]
1313
internal class TestWebApi

SendGrid/Tests/app.config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@
1616
</dependentAssembly>
1717
</assemblyBinding>
1818
</runtime>
19-
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
19+
<startup>
20+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
21+
</startup>
22+
</configuration>

SendGrid/UnitTests/Properties/AssemblyInfo.cs renamed to SendGrid/UnitTest/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
// General Information about an assembly is controlled through the following
66
// set of attributes. Change these attribute values to modify the information
77
// associated with an assembly.
8-
[assembly: AssemblyTitle("UnitTests")]
8+
[assembly: AssemblyTitle("UnitTest")]
99
[assembly: AssemblyDescription("")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyCompany("")]
12-
[assembly: AssemblyProduct("UnitTests")]
12+
[assembly: AssemblyProduct("UnitTest")]
1313
[assembly: AssemblyCopyright("Copyright © 2015")]
1414
[assembly: AssemblyTrademark("")]
1515
[assembly: AssemblyCulture("")]
@@ -20,7 +20,7 @@
2020
[assembly: ComVisible(false)]
2121

2222
// The following GUID is for the ID of the typelib if this project is exposed to COM
23-
[assembly: Guid("2be80f7d-ebb3-47f5-8ccb-b0f634d51849")]
23+
[assembly: Guid("8a66032b-0d1c-4f24-b0e3-a250f31d09d8")]
2424

2525
// Version information for an assembly consists of the following four values:
2626
//

SendGrid/UnitTests/SendGridTests.cs renamed to SendGrid/UnitTest/UnitTest.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,14 @@
55
using Newtonsoft.Json.Linq;
66
using SendGrid;
77

8-
namespace SendGridTests
8+
namespace UnitTest
99
{
10-
public class Base
10+
[TestClass]
11+
public class UnitTest
1112
{
1213
static string _baseUri = "https://api.sendgrid.com/";
1314
static string _apiKey = Environment.GetEnvironmentVariable("SENDGRID_APIKEY", EnvironmentVariableTarget.User);
1415
public Client client = new Client(_apiKey, _baseUri);
15-
}
16-
17-
[TestClass]
18-
public class ApiKeys : Base
19-
{
2016
private static string _api_key_id = "";
2117

2218
[TestMethod]

SendGrid/UnitTests/SendGridTests.csproj renamed to SendGrid/UnitTest/UnitTests.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProjectGuid>{2BE80F7D-EBB3-47F5-8CCB-B0F634D51849}</ProjectGuid>
6+
<ProjectGuid>{8A66032B-0D1C-4F24-B0E3-A250F31D09D8}</ProjectGuid>
77
<OutputType>Library</OutputType>
88
<AppDesignerFolder>Properties</AppDesignerFolder>
9-
<RootNamespace>UnitTests</RootNamespace>
10-
<AssemblyName>UnitTests</AssemblyName>
9+
<RootNamespace>UnitTest</RootNamespace>
10+
<AssemblyName>UnitTest</AssemblyName>
1111
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@@ -41,7 +41,6 @@
4141
<Private>True</Private>
4242
</Reference>
4343
<Reference Include="System" />
44-
<Reference Include="System.Net" />
4544
<Reference Include="System.Net.Http" />
4645
</ItemGroup>
4746
<Choose>
@@ -57,7 +56,7 @@
5756
</Otherwise>
5857
</Choose>
5958
<ItemGroup>
60-
<Compile Include="SendGridTests.cs" />
59+
<Compile Include="UnitTest.cs" />
6160
<Compile Include="Properties\AssemblyInfo.cs" />
6261
</ItemGroup>
6362
<ItemGroup>
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
3+
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net452" />
44
</packages>

0 commit comments

Comments
 (0)