Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create release #34

Merged
merged 19 commits into from
Sep 15, 2015
Merged
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
Binary file modified .nuget/NuGet.exe
Binary file not shown.
1 change: 0 additions & 1 deletion .nuget/NuGet.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
<PackageSource Include="https://nuget.org/api/v2/" />
<PackageSource Include="http://aumelbdgorep01.myob.myobcorp.net/NuGetRepository/nuget" />
</ItemGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
Expand Down
11 changes: 7 additions & 4 deletions .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="coveralls.io" version="1.1.86" />
<package id="NUnit.Runners" version="2.6.3" />
<package id="OpenCover" version="4.5.3723" />
<package id="ReportGenerator" version="2.0.4.0" />
<package id="coveralls.io" version="1.3.4" />
<package id="Microsoft.Bcl" version="1.1.10" />
<package id="Microsoft.Bcl.Async" version="1.0.168" />
<package id="Microsoft.Bcl.Build" version="1.0.21" />
<package id="NUnit.Runners" version="2.6.4" />
<package id="OpenCover" version="4.6.166" />
<package id="ReportGenerator" version="2.1.8.0" />
<package id="xunit.runners" version="1.9.2" />
</packages>
10 changes: 6 additions & 4 deletions MYOB.API.SDK.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{54C69256-9C55-41DC-A383-6C00EA66DB39}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
Expand All @@ -13,11 +15,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDK", "MYOB.API.SDK\SDK\SDK
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDK.Test", "MYOB.API.SDK\SDK.Test\SDK.Test.csproj", "{9E27D45B-CEC4-4571-B4F6-51D6BF4FA0DE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDK.NET35", "MYOB.API.SDK\SDK\SDK.NET35.csproj", "{980CC093-31FA-4A92-89EC-17669702CE2C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDK.NET35", "MYOB.API.SDK\SDK.NET35\SDK.NET35.csproj", "{980CC093-31FA-4A92-89EC-17669702CE2C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDK.NET40", "MYOB.API.SDK\SDK\SDK.NET40.csproj", "{E7C4C255-4DB8-4F10-A4A6-A6A160877F29}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDK.NET40", "MYOB.API.SDK\SDK.NET40\SDK.NET40.csproj", "{E7C4C255-4DB8-4F10-A4A6-A6A160877F29}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDK.NET45", "MYOB.API.SDK\SDK\SDK.NET45.csproj", "{33DD5156-E3B7-47FC-913D-5216019146A7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SDK.NET45", "MYOB.API.SDK\SDK.NET45\SDK.NET45.csproj", "{33DD5156-E3B7-47FC-913D-5216019146A7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{44138A7C-2D66-4F23-AD7C-DD9E94FFC378}"
ProjectSection(SolutionItems) = preProject
Expand Down
1,098 changes: 1,098 additions & 0 deletions MYOB.API.SDK/SDK.NET35/SDK.NET35.csproj

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions MYOB.API.SDK/SDK.NET35/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net35" />
</packages>
1,121 changes: 1,121 additions & 0 deletions MYOB.API.SDK/SDK.NET40/SDK.NET40.csproj

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions MYOB.API.SDK/SDK.NET40/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
7 changes: 7 additions & 0 deletions MYOB.API.SDK/SDK.NET40/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net40" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net40" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net40" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net40" />
</packages>
1,095 changes: 1,095 additions & 0 deletions MYOB.API.SDK/SDK.NET45/SDK.NET45.csproj

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions MYOB.API.SDK/SDK.NET45/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
</packages>
25 changes: 15 additions & 10 deletions MYOB.API.SDK/SDK.Package/Package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,27 @@
<copyright>Copyright MYOB Technology Pty. Ltd. 2013-2015</copyright>
<dependencies>
<group targetFramework="net35">
<dependency id="Newtonsoft.Json" version="6.0.5" />
<dependency id="Newtonsoft.Json" version="7.0.1" />
</group>
<group targetFramework="net40">
<dependency id="Newtonsoft.Json" version="6.0.5" />
<dependency id="Microsoft.Bcl.Async" version="1.0.165" />
<dependency id="Newtonsoft.Json" version="7.0.1" />
<dependency id="Microsoft.Bcl" version="1.1.10" />
<dependency id="Microsoft.Bcl.Async" version="1.0.168" />
<dependency id="Microsoft.Bcl.Build" version="1.0.21" />
</group>
<group targetFramework="net45">
<dependency id="Newtonsoft.Json" version="6.0.5" />
<dependency id="Newtonsoft.Json" version="7.0.1" />
</group>
<group targetFramework="portable-net40+sl4+wp71+win8">
<dependency id="Newtonsoft.Json" version="5.0.6" />
<dependency id="sharpcompress" version="0.10.1.3" />
<dependency id="Microsoft.Bcl.Async" version="1.0.165" />
<group targetFramework="portable-net45+win+wpa81+wp80">
<dependency id="Newtonsoft.Json" version="7.0.1" />
<dependency id="Microsoft.Bcl" version="1.1.10" />
<dependency id="Microsoft.Bcl.Async" version="1.0.168" />
<dependency id="Microsoft.Bcl.Build" version="1.0.21" />
<dependency id="Microsoft.Bcl.Compression" version="3.9.85" />
</group>
</dependencies>
<references></references>
<tags>MYOB AccountRight SDK Portable</tags>
<tags>MYOB AccountRight SDK Portable linqpad-samples</tags>
</metadata>
<files>
<!--
Expand All @@ -48,7 +52,7 @@
<file src="content\" target="content" />
-->
<file src="..\..\Artefacts\SDK\Ship\MYOB.AccountRight.SDK.dll" target="lib\portable-net4+sl4+wp7+win8" />
<file src="..\..\Artefacts\SDK\Ship\MYOB.AccountRight.SDK.pdb" target="lib\portable-net4+sl4+wp7+win8" />
<file src="..\..\Artefacts\SDK\Ship\MYOB.AccountRight.SDK.pdb" target="lib\portable-net4+sl4+wp7+win8" />
<file src="..\..\Artefacts\SDK\Ship\MYOB.AccountRight.SDK.xml" target="lib\portable-net4+sl4+wp7+win8" />
<file src="..\..\Artefacts\SDK\Ship\NET35\MYOB.AccountRight.SDK.dll" target="lib\net35" />
<file src="..\..\Artefacts\SDK\Ship\NET35\MYOB.AccountRight.SDK.pdb" target="lib\net35" />
Expand All @@ -60,5 +64,6 @@
<file src="..\..\Artefacts\SDK\Ship\NET45\MYOB.AccountRight.SDK.pdb" target="lib\net45" />
<file src="..\..\Artefacts\SDK\Ship\NET45\MYOB.AccountRight.SDK.xml" target="lib\net45" />
<file src="readme.txt" target="" />
<file src="linqpad-samples\" target="linqpad-samples" />
</files>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<Query Kind="Statements">
<NuGetReference>MYOB.AccountRight.API.SDK</NuGetReference>
<Namespace>MYOB.AccountRight.SDK</Namespace>
<Namespace>MYOB.AccountRight.SDK.Communication</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.Banking</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.Company</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.Contact</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.GeneralLedger</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.Inventory</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.Payroll</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.PayrollCategory</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.Purchase</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.Report.Payroll</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.Sale</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.Security</Namespace>
<Namespace>MYOB.AccountRight.SDK.Contracts.Version2.TimeBilling</Namespace>
<Namespace>MYOB.AccountRight.SDK.Extensions</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.Banking</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.Company</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.Contact</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.GeneralLedger</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.Inventory</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.Payroll</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.PayrollCategory</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.Purchase</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.Report.Payroll</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.Sale</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.Security</Namespace>
<Namespace>MYOB.AccountRight.SDK.Services.TimeBilling</Namespace>
</Query>

// set up the configuration for working against a local CF
var configuration = new ApiConfiguration("http://localhost:8080/accountright");

// get all company files
var cfService = new CompanyFileService(configuration);
var companyFiles = cfService.GetRange();

// get the target company file (this is a sample CF)
var cwtr = companyFiles.First(c => c.ProductVersion == "2015.3" && c.LibraryPath.Contains("Clearwater_Plus_AU"));
cwtr.Dump();

// list the accounts (now we need some credentials)
var credentials = new CompanyFileCredentials("Administrator","");
var accounts = new AccountService(configuration).GetRange(cwtr, null, credentials);
accounts.Dump();
8 changes: 6 additions & 2 deletions MYOB.API.SDK/SDK.Test/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
<dependentAssembly>
<assemblyIdentity name="System.IO.Abstractions" publicKeyToken="d480b5b72fb413da" culture="neutral" />
<!-- <bindingRedirect oldVersion="0.0.0.0-2.9.9.9" newVersion="4.3.0.0"/> -->
<bindingRedirect oldVersion="0.0.0.0-1.4.0.92" newVersion="1.4.0.92" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.116" newVersion="2.0.0.116" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
</configuration>
4 changes: 4 additions & 0 deletions MYOB.API.SDK/SDK.Test/Communication/ApiRequestHandlerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@ async public void TheEntityIsPlacedOnTheOutgoingStreamInJsonFormatDuringPutAsync
var request = factory.Create(new Uri("http://localhost"));

var stream = new MemoryStream();
#pragma warning disable 1998
request.GetRequestStreamAsync().Returns(async c => (Stream)stream);
#pragma warning restore 1998

var handler = new ApiRequestHandler(new ApiConfiguration("<<clientid>>", "<<clientsecret>>", "<<redirecturl>>"), null);

Expand Down Expand Up @@ -384,7 +386,9 @@ async public void TheEntityIsPlacedOnTheOutgoingStreamInJsonFormatDuringPostAsyn
var request = factory.Create(new Uri("http://localhost"));

var stream = new MemoryStream();
#pragma warning disable 1998
request.GetRequestStreamAsync().Returns(async c => (Stream)stream);
#pragma warning restore 1998

var handler = new ApiRequestHandler(new ApiConfiguration("<<clientid>>", "<<clientsecret>>", "<<redirecturl>>"), null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ public void SetUp()

_stream = new MemoryStream();
_request.EndGetRequestStream(Arg.Any<IAsyncResult>()).Returns(c => _stream);
#pragma warning disable 1998
_request.GetRequestStreamAsync().Returns(async c => (Stream)_stream);
#pragma warning restore 1998

_handler = new OAuthRequestHandler(new ApiConfiguration("<<clientid>>", "<<clientsecret>>", "http://desktop/"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ public async Task GetResponseAsync_Calls_Underlying_GetResponseAsyncMethod()
{
var request = Substitute.For<WebRequest>();

request.GetResponseAsync(CancellationToken.None);
await request.GetResponseAsync(CancellationToken.None);

#pragma warning disable 4014
request.Received().GetResponseAsync();
#pragma warning restore 4014
}

[Test]
Expand Down Expand Up @@ -63,7 +65,9 @@ public void Exceptions_Are_Converted_To_OperationCanceledExceptions_If_Cancelled

throw new WebException();

#pragma warning disable 162
return (WebResponse)null;
#pragma warning restore 162
}));

var cancellationSource = new CancellationTokenSource();
Expand Down Expand Up @@ -91,7 +95,9 @@ public void Errors_Are_Not_Converted_To_OperationCanceledExceptions_If_Not_Cance

throw new WebException();

#pragma warning disable 162
return (WebResponse)null;
#pragma warning restore 162
}));

var getResponseTask = request.GetResponseAsync(CancellationToken.None);
Expand Down
4 changes: 4 additions & 0 deletions MYOB.API.SDK/SDK.Test/Helper/TestWebRequestFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ protected HttpWebRequest CreateWebRequest(Uri uri, Func<WebResponse> toReturn)

Stream ms = new MemoryStream();

#pragma warning disable 1998
request.GetRequestStreamAsync().Returns(async c => ms);
#pragma warning restore 1998

request.EndGetRequestStream(Arg.Any<IAsyncResult>()).Returns(c => ms);

Expand All @@ -144,7 +146,9 @@ protected HttpWebRequest CreateWebRequest(Uri uri, Func<WebResponse> toReturn)
request.EndGetResponse(Arg.Any<IAsyncResult>())
.Returns(c => toReturn());

#pragma warning disable 1998
request.GetResponseAsync().Returns(async c => toReturn());
#pragma warning restore 1998

if (CreatedWebRequest != null) CreatedWebRequest(request);

Expand Down
Loading