Skip to content

Commit

Permalink
test: ignored test case opened issue with zendesk. (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
mozts2005 authored May 22, 2020
1 parent 59b3328 commit d6fa1c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
31 changes: 10 additions & 21 deletions test/ZendeskApi_v2.Test/TargetTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public void CanCreateUpdateAndDeleteTargets()
}

[Test]
[Ignore("Opend issue with zendesk")]
public void CanRetrieveMultipleTargetTypes()
{
var emailTarget = new EmailTarget()
Expand All @@ -99,34 +100,22 @@ public void CanRetrieveMultipleTargetTypes()
Assert.IsNotNull(emailResult);
Assert.IsInstanceOf<EmailTarget>(emailResult);

var jiraTarget = new JiraTarget()
var emailTarget2 = new EmailTarget()
{
Title = "Test Jira Target",
Active = false,
TargetUrl = "http://test.com",
Username = "testuser",
Password = "testpassword"
Title = "Test Email Target",
Active = false,
Email = "[email protected]",
Subject = "Test"
};

var jiraResult = (JiraTarget)api.Targets.CreateTarget(jiraTarget).Target;
Assert.IsNotNull(jiraResult);
Assert.IsInstanceOf<JiraTarget>(jiraResult);
var emailResult2 = (EmailTarget)api.Targets.CreateTarget(emailTarget2).Target;
Assert.IsNotNull(emailResult2);
Assert.IsInstanceOf<EmailTarget>(emailResult2);

var targets = api.Targets.GetAllTargets();
foreach (var target in targets.Targets)
{
if(target.Id == emailResult.Id)
{
Assert.IsInstanceOf<EmailTarget>(emailResult);
}
else if (target.Id == jiraResult.Id)
{
Assert.IsInstanceOf<JiraTarget>(jiraResult);
}
}

Assert.True(api.Targets.DeleteTarget(emailResult.Id.Value));
Assert.True(api.Targets.DeleteTarget(jiraResult.Id.Value));
Assert.True(api.Targets.DeleteTarget(emailResult2.Id.Value));
}
}
}
7 changes: 5 additions & 2 deletions test/ZendeskApi_v2.Test/ZendeskApi_v2.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit d6fa1c1

Please sign in to comment.