Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ build/*.nupkg
*.orig
*.[Dd]ot[Ss]ettings
/packages/*
/.vs/*
!packages/repositories.config
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
language: csharp

solution: WHMCS.net.sln
mono: none
dist: xenial
dotnet: 3.1.100

branches:
only:
- master

install:
- nuget restore WHMCS.net.sln
- nuget install xunit.runners -Version 1.9.2 -OutputDirectory testrunner

script:
- xbuild /p:Configuration=Release WHMCS.net.sln
- mono ./testrunner/xunit.runners.1.9.2/tools/xunit.console.clr4.exe ./WHMCS.Net.Test/bin/Release/WHMCS.Net.Test.dll
- dotnet test
8 changes: 2 additions & 6 deletions WHMCS.Net.Test/OrderTest.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Moq;
using WHMCS.Net.Interfaces;
using WHMCS.Net.Models;
Expand All @@ -14,8 +10,8 @@ namespace WHMCS.Net.Test
{
public class OrderTest
{
private readonly string _jsonData = "{}";
private readonly Expression<Func<IDatastore, string>> _invoiceExpectation = datastore => datastore.GetData("Website", It.IsNotNull<NameValueCollection>());
readonly string _jsonData = "{}";
readonly Expression<Func<IDatastore, string>> _invoiceExpectation = datastore => datastore.GetData("Website", It.IsNotNull<NameValueCollection>());

[Fact]
public void TestGetSingleInvoice()
Expand Down
36 changes: 0 additions & 36 deletions WHMCS.Net.Test/Properties/AssemblyInfo.cs

This file was deleted.

94 changes: 19 additions & 75 deletions WHMCS.Net.Test/WHMCS.Net.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,78 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.runner.visualstudio.2.0.0-rc1-build1030\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\packages\xunit.runner.visualstudio.2.0.0-rc1-build1030\build\net20\xunit.runner.visualstudio.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0767F795-9A66-4D11-A4CA-2ACE7F904A9E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WHMCS.Net.Test</RootNamespace>
<AssemblyName>WHMCS.Net.Test</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Moq">
<HintPath>..\packages\Moq.4.2.1409.1722\lib\net40\Moq.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.XML" />
<Reference Include="xunit, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="InitializeTest.cs" />
<Compile Include="OrderTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ProductTest.cs" />
<Compile Include="InvoiceTest.cs" />
<Compile Include="StatsTest.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WHMCS.Net\WHMCS.Net.csproj">
<Project>{846231f2-7d3f-4189-882c-165e96b2da4c}</Project>
<Name>WHMCS.Net</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
<TargetFrameworks>netcoreapp3.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>
<Error Condition="!Exists('..\packages\xunit.runner.visualstudio.2.0.0-rc1-build1030\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.runner.visualstudio.2.0.0-rc1-build1030\build\net20\xunit.runner.visualstudio.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Moq" Version="4.13.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\WHMCS.Net\WHMCS.Net.csproj" />
</ItemGroup>

</Project>
6 changes: 0 additions & 6 deletions WHMCS.Net.Test/packages.config

This file was deleted.

36 changes: 0 additions & 36 deletions WHMCS.Net/Properties/AssemblyInfo.cs

This file was deleted.

97 changes: 13 additions & 84 deletions WHMCS.Net/WHMCS.Net.csproj
Original file line number Diff line number Diff line change
@@ -1,85 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{846231F2-7D3F-4189-882C-165E96B2DA4C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WHMCS.Net</RootNamespace>
<AssemblyName>WHMCS.Net</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Interfaces\IDatastore.cs" />
<Compile Include="Interfaces\IResponse.cs" />
<Compile Include="Models\ClientsDetailsResponse.cs" />
<Compile Include="Models\ConfigOptions.cs" />
<Compile Include="Models\CustomFields.cs" />
<Compile Include="Models\GBP.cs" />
<Compile Include="Models\InvoiceResponse.cs" />
<Compile Include="Models\Item.cs" />
<Compile Include="Models\Items.cs" />
<Compile Include="Models\Lineitem.cs" />
<Compile Include="Models\Lineitems.cs" />
<Compile Include="Models\Order.cs" />
<Compile Include="Models\Orders.cs" />
<Compile Include="Models\OrdersResponse.cs" />
<Compile Include="Models\Enums\OrderStatus.cs" />
<Compile Include="Models\Pricing.cs" />
<Compile Include="Models\Product.cs" />
<Compile Include="Datastore.cs" />
<Compile Include="Models\Products.cs" />
<Compile Include="Models\ProductsResponse.cs" />
<Compile Include="Models\StatsResponse.cs" />
<Compile Include="Models\Transactions.cs" />
<Compile Include="Models\Transation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Security.cs" />
<Compile Include="WhmcsApi.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.1</TargetFrameworks>
<PackageProjectUrl>https://github.com/lareeth/WHMCS.net</PackageProjectUrl>
<PackageTags>WHMCS</PackageTags>
<Authors>Gareth Luckett</Authors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

</Project>
16 changes: 0 additions & 16 deletions WHMCS.Net/WHMCS.net.nuspec

This file was deleted.

4 changes: 0 additions & 4 deletions WHMCS.Net/packages.config

This file was deleted.

10 changes: 6 additions & 4 deletions WHMCS.net.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
# Visual Studio 15
VisualStudioVersion = 15.0.28307.271
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WHMCS.Net", "WHMCS.Net\WHMCS.Net.csproj", "{846231F2-7D3F-4189-882C-165E96B2DA4C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WHMCS.Net", "WHMCS.Net\WHMCS.Net.csproj", "{846231F2-7D3F-4189-882C-165E96B2DA4C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WHMCS.Net.Tests", "WHMCS.Net.Test\WHMCS.Net.Tests.csproj", "{0767F795-9A66-4D11-A4CA-2ACE7F904A9E}"
EndProject

Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -26,4 +25,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {06C5C9E6-A777-4C62-ACDA-168D86D9040D}
EndGlobalSection
EndGlobal
5 changes: 0 additions & 5 deletions packages/repositories.config

This file was deleted.