diff --git a/scripts/runtests.cmd b/scripts/runtests.cmd index fbc5a6ec..1b6ecc11 100644 --- a/scripts/runtests.cmd +++ b/scripts/runtests.cmd @@ -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" \ No newline at end of file +"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" \ No newline at end of file diff --git a/src/ChatterToolkitForNET.FunctionalTests/ChatterClientTests.cs b/src/ChatterToolkitForNET.FunctionalTests/ChatterClientTests.cs index 6aa5be94..10574c6a 100644 --- a/src/ChatterToolkitForNET.FunctionalTests/ChatterClientTests.cs +++ b/src/ChatterToolkitForNET.FunctionalTests/ChatterClientTests.cs @@ -21,7 +21,7 @@ public class ChatterClientTests private AuthenticationClient _auth; private ChatterClient _chatterClient; - // Test Setup + [TestFixtureSetUp] public void Init() { @@ -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] @@ -51,7 +49,7 @@ public void Chatter_IsNotNull() } [Test] - public async void Chatter_Feeds_IsNotNull() + public async Task Chatter_Feeds_IsNotNull() { var feeds = await _chatterClient.FeedsAsync(); @@ -59,7 +57,7 @@ public async void Chatter_Feeds_IsNotNull() } [Test] - public async void Chatter_Users_Me_IsNotNull() + public async Task Chatter_Users_Me_IsNotNull() { var me = await _chatterClient.MeAsync(); @@ -67,7 +65,7 @@ public async void Chatter_Users_Me_IsNotNull() } [Test] - public async void Chatter_Users_Me_Id_IsNotNull() + public async Task Chatter_Users_Me_Id_IsNotNull() { var me = await _chatterClient.MeAsync(); @@ -75,14 +73,14 @@ public async void Chatter_Users_Me_Id_IsNotNull() } [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; @@ -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; @@ -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; @@ -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; @@ -169,7 +167,7 @@ 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(); @@ -177,7 +175,7 @@ public async void Chatter_Get_My_News_Feed_IsNotNull() } [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("wade"); @@ -185,7 +183,7 @@ public async void Chatter_Get_My_News_Feed_WithQuery_IsNotNull() } [Test] - public async void Chatter_Get_Groups_IsNotNull() + public async Task Chatter_Get_Groups_IsNotNull() { var groups = await _chatterClient.GetGroupsAsync(); @@ -193,7 +191,7 @@ public async void Chatter_Get_Groups_IsNotNull() } [Test] - public async void Chatter_Get_Group_News_Feed_IsNotNull() + public async Task Chatter_Get_Group_News_Feed_IsNotNull() { var groups = await _chatterClient.GetGroupsAsync(); if (groups.Groups.Count > 0) @@ -210,7 +208,7 @@ 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(); @@ -218,7 +216,7 @@ public async void Chatter_Get_Topics_IsNotNull() } [Test] - public async void Chatter_Get_Users_IsNotNull() + public async Task Chatter_Get_Users_IsNotNull() { var users = await _chatterClient.GetUsersAsync(); diff --git a/src/ChatterToolkitForNET.FunctionalTests/ChatterToolkitForNET.FunctionalTests.csproj b/src/ChatterToolkitForNET.FunctionalTests/ChatterToolkitForNET.FunctionalTests.csproj index 643ebc78..e66674ce 100644 --- a/src/ChatterToolkitForNET.FunctionalTests/ChatterToolkitForNET.FunctionalTests.csproj +++ b/src/ChatterToolkitForNET.FunctionalTests/ChatterToolkitForNET.FunctionalTests.csproj @@ -48,10 +48,10 @@ True - ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll True - + ..\packages\NUnit.2.6.4\lib\nunit.framework.dll True diff --git a/src/ChatterToolkitForNET.FunctionalTests/packages.config b/src/ChatterToolkitForNET.FunctionalTests/packages.config index 4629f62e..2ab32810 100644 --- a/src/ChatterToolkitForNET.FunctionalTests/packages.config +++ b/src/ChatterToolkitForNET.FunctionalTests/packages.config @@ -5,6 +5,6 @@ - + \ No newline at end of file diff --git a/src/ChatterToolkitForNET/ChatterToolkitForNET.csproj b/src/ChatterToolkitForNET/ChatterToolkitForNET.csproj index 220dcaa4..6b7982d8 100644 --- a/src/ChatterToolkitForNET/ChatterToolkitForNET.csproj +++ b/src/ChatterToolkitForNET/ChatterToolkitForNET.csproj @@ -11,14 +11,14 @@ Salesforce.Chatter Salesforce.Chatter v4.5 - Profile78 + Profile111 512 {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} ..\ true 12.0.0 2.0 - 501b16e7 + 61ddebfb true @@ -97,27 +97,25 @@ - - ..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wp8+wpa81\Microsoft.Threading.Tasks.dll + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wpa81\Microsoft.Threading.Tasks.dll + True - - ..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wp8+wpa81\Microsoft.Threading.Tasks.Extensions.dll + + ..\packages\Microsoft.Bcl.Async.1.0.168\lib\portable-net45+win8+wpa81\Microsoft.Threading.Tasks.Extensions.dll + True - ..\packages\Newtonsoft.Json.8.0.2\lib\portable-net45+wp80+win8+wpa81+dnxcore50\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.3\lib\portable-net45+wp80+win8+wpa81+dnxcore50\Newtonsoft.Json.dll True - - ..\packages\Microsoft.Bcl.Compression.3.9.85\lib\portable-net45+win8+wp8+wpa81\System.IO.Compression.dll - - - ..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.dll - - - ..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Extensions.dll + + ..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8+wpa81\System.Net.Http.Extensions.dll + True - - ..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net40+sl4+win8+wp71+wpa81\System.Net.Http.Primitives.dll + + ..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8+wpa81\System.Net.Http.Primitives.dll + True @@ -128,11 +126,6 @@ - - - - -