Skip to content

Commit

Permalink
Added a little test
Browse files Browse the repository at this point in the history
  • Loading branch information
journTommes committed Mar 30, 2020
1 parent a0c4e25 commit 8219427
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions HubSpot.NET.Examples/HubSpot.NET.Examples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<Compile Include="Deals.cs" />
<Compile Include="Contacts.cs" />
<Compile Include="OAuth.cs" />
<Compile Include="Pipelines.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Timeline.cs" />
Expand Down
34 changes: 34 additions & 0 deletions HubSpot.NET.Examples/Pipelines.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using HubSpot.NET.Api.Pipeline.Dto;
using HubSpot.NET.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HubSpot.NET.Examples
{
public class Pipelines
{
internal static void Example(HubSpotApi api)
{
try
{
Tests(api);
Console.WriteLine("Pipelines tests completed successfully!");
}
catch (Exception ex)
{
Console.WriteLine("Pipelines tests failed!");
Console.WriteLine(ex.ToString());
}
}

private static void Tests(HubSpotApi api)
{
//Get a list of pipelines and stages
var list = api.Pipelines.List<PipelineHubSpotModel>("deals", "INCLUDE_DELETED");

}
}
}
3 changes: 2 additions & 1 deletion HubSpot.NET.Examples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ private static void RunApiKeyExamples(HubSpotApi hapiApi)
{
//EmailSubscriptions.Example(hapiApi);
//Deals.Example(hapiApi);
Contacts.Example(hapiApi);
//Contacts.Example(hapiApi);
//Companies.Example(hapiApi);
//CompanyProperties.Example(hapiApi);
Pipelines.Example(hapiApi);
}

private static void RunOAuthExamples(HubSpotApi oauthApi)
Expand Down

0 comments on commit 8219427

Please sign in to comment.