Skip to content

Commit

Permalink
Lots of updates including profile 111
Browse files Browse the repository at this point in the history
  • Loading branch information
wadewegner committed Apr 25, 2016
1 parent 9af3398 commit fb95f60
Show file tree
Hide file tree
Showing 27 changed files with 253 additions and 265 deletions.
4 changes: 2 additions & 2 deletions scripts/runtests.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"assets/NuGet.exe" install NUnit.Runners -Version 2.6.4 -o packages
"assets/NuGet.exe" install NUnit.Runners -Version 3.2.1 -o packages

"packages/NUnit.Runners.2.6.4/tools/nunit-console.exe" -noxml -nodots -labels -stoponerror "..\src\ChatterToolkitForNET.FunctionalTests\bin\Debug\Salesforce.Chatter.FunctionalTests.dll" "..\src\CommonLibrariesForNET.FunctionalTests\bin\Debug\Salesforce.Common.FunctionalTests.dll" "..\src\CommonLibrariesForNET.UnitTests\bin\Debug\Salesforce.Common.UnitTests.dll" "..\src\ForceToolkitForNET.FunctionalTests\bin\Debug\Salesforce.Force.FunctionalTests.dll" "..\src\ForceToolkitForNet.UnitTests\bin\Debug\Salesforce.Force.UnitTests.dll"
"packages/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe" "..\src\ChatterToolkitForNET.FunctionalTests\bin\Debug\Salesforce.Chatter.FunctionalTests.dll" "..\src\CommonLibrariesForNET.FunctionalTests\bin\Debug\Salesforce.Common.FunctionalTests.dll" "..\src\CommonLibrariesForNET.UnitTests\bin\Debug\Salesforce.Common.UnitTests.dll" "..\src\ForceToolkitForNET.FunctionalTests\bin\Debug\Salesforce.Force.FunctionalTests.dll" "..\src\ForceToolkitForNet.UnitTests\bin\Debug\Salesforce.Force.UnitTests.dll"
40 changes: 19 additions & 21 deletions src/ChatterToolkitForNET.FunctionalTests/ChatterClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ChatterClientTests

private AuthenticationClient _auth;
private ChatterClient _chatterClient;
// Test Setup

[TestFixtureSetUp]
public void Init()
{
Expand All @@ -33,15 +33,13 @@ public void Init()
_password = Environment.GetEnvironmentVariable("Password");
}

_auth = new AuthenticationClient();
_auth.UsernamePasswordAsync(_consumerKey, _consumerSecret, _username, _password, TokenRequestEndpointUrl).Wait();

const string apiVersion = "v34.0";

// Use TLS 1.2 (instead of defaulting to 1.0)
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

_chatterClient = new ChatterClient(_auth.InstanceUrl, _auth.AccessToken, apiVersion);
_auth = new AuthenticationClient();
_auth.UsernamePasswordAsync(_consumerKey, _consumerSecret, _username, _password, TokenRequestEndpointUrl).Wait();

_chatterClient = new ChatterClient(_auth.InstanceUrl, _auth.AccessToken, _auth.ApiVersion);
}

[Test]
Expand All @@ -51,38 +49,38 @@ public void Chatter_IsNotNull()
}

[Test]
public async void Chatter_Feeds_IsNotNull()
public async Task Chatter_Feeds_IsNotNull()
{
var feeds = await _chatterClient.FeedsAsync<object>();

Assert.IsNotNull(feeds);
}

[Test]
public async void Chatter_Users_Me_IsNotNull()
public async Task Chatter_Users_Me_IsNotNull()
{
var me = await _chatterClient.MeAsync<UserDetail>();

Assert.IsNotNull(me);
}

[Test]
public async void Chatter_Users_Me_Id_IsNotNull()
public async Task Chatter_Users_Me_Id_IsNotNull()
{
var me = await _chatterClient.MeAsync<UserDetail>();

Assert.IsNotNull(me.id);
}

[Test]
public async void Chatter_PostFeedItem()
public async Task Chatter_PostFeedItem()
{
var feedItem = await postFeedItem(_chatterClient);
Assert.IsNotNull(feedItem);
}

[Test]
public async void Chatter_Add_Comment()
public async Task Chatter_Add_Comment()
{
var feedItem = await postFeedItem(_chatterClient);
var feedId = feedItem.Id;
Expand All @@ -105,7 +103,7 @@ public async void Chatter_Add_Comment()
}

[Test]
public async void Chatter_Add_Comment_With_Mention_IsNotNull()
public async Task Chatter_Add_Comment_With_Mention_IsNotNull()
{
var feedItem = await postFeedItem(_chatterClient);
var feedId = feedItem.Id;
Expand Down Expand Up @@ -144,7 +142,7 @@ public async void Chatter_Add_Comment_With_Mention_IsNotNull()
}

[Test]
public async void Chatter_Like_FeedItem_IsNotNull()
public async Task Chatter_Like_FeedItem_IsNotNull()
{
var feedItem = await postFeedItem(_chatterClient);
var feedId = feedItem.Id;
Expand All @@ -155,7 +153,7 @@ public async void Chatter_Like_FeedItem_IsNotNull()
}

[Test]
public async void Chatter_Share_FeedItem_IsNotNull()
public async Task Chatter_Share_FeedItem_IsNotNull()
{
var feedItem = await postFeedItem(_chatterClient);
var feedId = feedItem.Id;
Expand All @@ -169,31 +167,31 @@ public async void Chatter_Share_FeedItem_IsNotNull()
}

[Test]
public async void Chatter_Get_My_News_Feed_IsNotNull()
public async Task Chatter_Get_My_News_Feed_IsNotNull()
{
var myNewsFeeds = await _chatterClient.GetMyNewsFeedAsync<FeedItemPage>();

Assert.IsNotNull(myNewsFeeds);
}

[Test]
public async void Chatter_Get_My_News_Feed_WithQuery_IsNotNull()
public async Task Chatter_Get_My_News_Feed_WithQuery_IsNotNull()
{
var myNewsFeeds = await _chatterClient.GetMyNewsFeedAsync<FeedItemPage>("wade");

Assert.IsNotNull(myNewsFeeds);
}

[Test]
public async void Chatter_Get_Groups_IsNotNull()
public async Task Chatter_Get_Groups_IsNotNull()
{
var groups = await _chatterClient.GetGroupsAsync<GroupPage>();

Assert.IsNotNull(groups);
}

[Test]
public async void Chatter_Get_Group_News_Feed_IsNotNull()
public async Task Chatter_Get_Group_News_Feed_IsNotNull()
{
var groups = await _chatterClient.GetGroupsAsync<GroupPage>();
if (groups.Groups.Count > 0)
Expand All @@ -210,15 +208,15 @@ public async void Chatter_Get_Group_News_Feed_IsNotNull()
}

[Test]
public async void Chatter_Get_Topics_IsNotNull()
public async Task Chatter_Get_Topics_IsNotNull()
{
var topics = await _chatterClient.GetTopicsAsync<TopicCollection>();

Assert.IsNotNull(topics);
}

[Test]
public async void Chatter_Get_Users_IsNotNull()
public async Task Chatter_Get_Users_IsNotNull()
{
var users = await _chatterClient.GetUsersAsync<UserPage>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework">
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
Expand Down
2 changes: 1 addition & 1 deletion src/ChatterToolkitForNET.FunctionalTests/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Microsoft.Bcl.Compression" version="3.9.85" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
<package id="NUnit" version="2.6.4" targetFramework="net45" />
</packages>
37 changes: 15 additions & 22 deletions src/ChatterToolkitForNET/ChatterToolkitForNET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<RootNamespace>Salesforce.Chatter</RootNamespace>
<AssemblyName>Salesforce.Chatter</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
<TargetFrameworkProfile>Profile111</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<ProductVersion>12.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<NuGetPackageImportStamp>501b16e7</NuGetPackageImportStamp>
<NuGetPackageImportStamp>61ddebfb</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -97,27 +97,25 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Threading.Tasks">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wp8+wpa81\Microsoft.Threading.Tasks.dll</HintPath>
<Reference Include="Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wpa81\Microsoft.Threading.Tasks.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Threading.Tasks.Extensions">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wp8+wpa81\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
<Reference Include="Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wpa81\Microsoft.Threading.Tasks.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\portable-net45+wp80+win8+wpa81+dnxcore50\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\portable-net45+wp80+win8+wpa81+dnxcore50\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression">
<HintPath>..\packages\Microsoft.Bcl.Compression.3.9.85\lib\portable-net45+win8+wp8+wpa81\System.IO.Compression.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Extensions">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll</HintPath>
<Reference Include="System.Net.Http.Extensions, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8+wpa81\System.Net.Http.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http.Primitives">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll</HintPath>
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8+wpa81\System.Net.Http.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
Expand All @@ -128,11 +126,6 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<Import Project="..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureBclBuildImported" BeforeTargets="BeforeBuild" Condition="'$(BclBuildImported)' == ''">
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="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=317567." HelpKeyword="BCLBUILD2001" />
<Error Condition="Exists('..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" Text="The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568." HelpKeyword="BCLBUILD2002" />
</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">
Expand Down
11 changes: 5 additions & 6 deletions src/ChatterToolkitForNET/packages.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="portable-net45+win8+wp8" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="portable-net45+win8+wp8" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="portable-net45+win8+wp8" />
<package id="Microsoft.Bcl.Compression" version="3.9.85" targetFramework="net45" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="portable-net45+win8+wp8" />
<package id="Newtonsoft.Json" version="8.0.2" targetFramework="portable-net45+dnxcore50+win+wp80" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="portable-net45+win+wpa81" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="portable-net45+win+wpa81" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="portable-net45+win+wpa81" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="portable-net45+win+wpa81" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="portable-net45+win+wpa81" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework">
<Reference Include="nunit.framework, Version=2.6.4.14350, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
Expand Down
Loading

0 comments on commit fb95f60

Please sign in to comment.