Skip to content

Commit

Permalink
Updated links in readme and modified the tests so that they always us…
Browse files Browse the repository at this point in the history
…e a unique email address.
  • Loading branch information
jjb3rd committed Aug 10, 2015
1 parent d886e2f commit 8478b13
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 54 deletions.
100 changes: 50 additions & 50 deletions Freshdesk.Tests/CustomerTests.cs
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
/*
* Copyright 2015 Beckersoft, Inc.
*
* Author(s):
* John Becker ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using NUnit.Framework;

namespace Freshdesk.Tests
{
[TestFixture]
public class CustomerTests
{
Freshdesk.FreshdeskService freshdeskService = new Freshdesk.FreshdeskService(Settings.FreshdeskApiKey, Settings.FreshdeskUri);

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Freshdesk")]
[Test]
public void FreshdeskCreateCustomer()
{
// create Organization with Support software integration
Freshdesk.GetCustomerResponse customerResponse = freshdeskService.CreateCustomer(new Freshdesk.CreateCustomerRequest()
{
Customer = new Freshdesk.Customer()
{
Name = "ACME Corp.",
Description = "The ACME Corporation"
}
});
Assert.IsNotNull(customerResponse);
Assert.IsNotNull(customerResponse.Customer);
if(customerResponse.Customer.Id < 1)
{
Assert.Fail("Invalid customer id.");
}
}
}
}
/*
* Copyright 2015 Beckersoft, Inc.
*
* Author(s):
* John Becker ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using NUnit.Framework;

namespace Freshdesk.Tests
{
[TestFixture]
public class CustomerTests
{
Freshdesk.FreshdeskService freshdeskService = new Freshdesk.FreshdeskService(Settings.FreshdeskApiKey, Settings.FreshdeskUri);

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Freshdesk")]
[Test]
public void FreshdeskCreateCustomer()
{
// create Organization with Support software integration
Freshdesk.GetCustomerResponse customerResponse = freshdeskService.CreateCustomer(new Freshdesk.CreateCustomerRequest()
{
Customer = new Freshdesk.Customer()
{
Name = "ACME Corp. Division #" + Guid.NewGuid().ToString("N"),
Description = "The ACME Corporation"
}
});
Assert.IsNotNull(customerResponse);
Assert.IsNotNull(customerResponse.Customer);
if(customerResponse.Customer.Id < 1)
{
Assert.Fail("Invalid customer id.");
}
}
}
}
2 changes: 1 addition & 1 deletion Freshdesk.Tests/UserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void FreshdeskCreateContact()
User = new Freshdesk.User()
{
Name = "Bugs Bunny",
Email = "bugsbunny@acme.com"
Email = "bugs" + Guid.NewGuid().ToString("N") + "@acme.com"
}
});
Assert.IsNotNull(userResponse);
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Freshdesk.NET

[![Travis](https://travis-ci.org/jjb3rd/Freshdesk.Net.svg)]()
[![NuGet](https://img.shields.io/nuget/v/Freshdesk.svg)]()
[![NuGet](https://img.shields.io/nuget/dt/Freshdesk.svg)]()
[![Travis](https://travis-ci.org/jjb3rd/Freshdesk.Net.svg)](https://travis-ci.org/jjb3rd/Freshdesk.Net)
[![NuGet](https://img.shields.io/nuget/v/Freshdesk.svg)](https://www.nuget.org/packages/Freshdesk/)
[![NuGet](https://img.shields.io/nuget/dt/Freshdesk.svg)](https://www.nuget.org/packages/Freshdesk/)

Freshdesk.Net is a .NET library for freshdesk.com's REST API. It can be used to create contacts, customers and tickets (with attachments). Freshdesk.Net also runs on Mono, so yay!

Expand Down

0 comments on commit 8478b13

Please sign in to comment.