From 7e99dbe76d88862b7a0c4ac14c5d5553a101a2be Mon Sep 17 00:00:00 2001 From: Gonzalo Zawadzki Date: Thu, 2 Nov 2017 16:17:58 -0300 Subject: [PATCH 1/5] Add JsonObject support to decimal --- LearnositySDK/LearnositySDK.csproj | 6 ++-- LearnositySDK/Utils/JsonObject.cs | 36 ++++++++++++------------ LearnositySDK/Utils/JsonObjectFactory.cs | 2 +- LearnositySDK/packages.config | 2 +- 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/LearnositySDK/LearnositySDK.csproj b/LearnositySDK/LearnositySDK.csproj index 80a0390..26e32c5 100755 --- a/LearnositySDK/LearnositySDK.csproj +++ b/LearnositySDK/LearnositySDK.csproj @@ -1,5 +1,5 @@  - + Debug AnyCPU @@ -10,7 +10,7 @@ Properties LearnositySDK LearnositySDK - v3.5 + v4.5.2 512 @@ -22,6 +22,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -30,6 +31,7 @@ TRACE prompt 4 + false diff --git a/LearnositySDK/Utils/JsonObject.cs b/LearnositySDK/Utils/JsonObject.cs index 6797f7c..55056ac 100755 --- a/LearnositySDK/Utils/JsonObject.cs +++ b/LearnositySDK/Utils/JsonObject.cs @@ -14,7 +14,7 @@ public class JsonObject : ICloneable private bool array; private int arrayIndex; private Dictionary di; - private Dictionary df; + private Dictionary dd; private Dictionary ds; private Dictionary dj; private Dictionary db; @@ -27,13 +27,13 @@ public JsonObject(bool isArray = false) this.array = isArray; this.arrayIndex = 0; // lastInsertedIndex this.di = new Dictionary(); - this.df = new Dictionary(); + this.dd = new Dictionary(); this.ds = new Dictionary(); this.dj = new Dictionary(); this.db = new Dictionary(); this.da = new Dictionary(); this.dt = new Dictionary(); - this.types = new string[7] { "int", "string", "JsonObject", "bool", "JsonArray", "float", "NULL" }; + this.types = new string[7] { "int", "string", "JsonObject", "bool", "JsonArray", "decimal", "NULL" }; } public bool isArray() @@ -55,7 +55,7 @@ public void set(int value) /// Sets/adds the value /// /// - public void set(float value) + public void set(decimal value) { this.set(this.arrayIndex, value); this.arrayIndex++; @@ -138,7 +138,7 @@ public void set(int key, int value) /// /// /// - public void set(int key, float value) + public void set(int key, decimal value) { this.set(key.ToString(), value); } @@ -208,9 +208,9 @@ public void set(string key, int value) /// /// /// - public void set(string key, float value) + public void set(string key, decimal value) { - this.set("float", key, value); + this.set("decimal", key, value); } /// @@ -268,7 +268,7 @@ public void remove(string key) { this.db.Remove(key); this.di.Remove(key); - this.df.Remove(key); + this.dd.Remove(key); this.ds.Remove(key); this.dj.Remove(key); this.da.Remove(key); @@ -325,7 +325,7 @@ public void set(string type, string key, Object value) break; case 4: this.da.Add(key, (JsonObject)value); break; - case 5: this.df.Add(key, (float)value); + case 5: this.dd.Add(key, (decimal)value); break; case 6: this.dt.Add(key, (JToken)value); break; @@ -453,10 +453,10 @@ public Object get(string key, ref string type) return this.da[key]; } - if (this.df.ContainsKey(key)) + if (this.dd.ContainsKey(key)) { - type = "float"; - return this.df[key]; + type = "decimal"; + return this.dd[key]; } if (this.dt.ContainsKey(key)) @@ -530,7 +530,7 @@ public string[] getKeys() l.Add(item.Key); } - foreach (KeyValuePair item in this.df) + foreach (KeyValuePair item in this.dd) { l.Add(item.Key); } @@ -578,7 +578,7 @@ public int count() count += this.db.Count; count += this.dj.Count; count += this.da.Count; - count += this.df.Count; + count += this.dd.Count; count += this.dt.Count; return count; @@ -625,9 +625,9 @@ public string toJson() { sb.Append(this.di[key].ToString()); } - else if (this.df.ContainsKey(key)) + else if (this.dd.ContainsKey(key)) { - sb.Append(this.df[key].ToString("R", CultureInfo.InvariantCulture)); + sb.Append(this.dd[key].ToString("R", CultureInfo.InvariantCulture)); } else if (this.ds.ContainsKey(key)) { @@ -671,14 +671,14 @@ public string toJson() index++; } - foreach (KeyValuePair item in this.df) + foreach (KeyValuePair item in this.dd) { if (index > 0) { sb.Append(","); } - sb.Append(Json.encode(item.Key) + ":" + item.Value.ToString("R", CultureInfo.InvariantCulture)); + sb.Append(Json.encode(item.Key) + ":" + item.Value.ToString(CultureInfo.InvariantCulture)); index++; } diff --git a/LearnositySDK/Utils/JsonObjectFactory.cs b/LearnositySDK/Utils/JsonObjectFactory.cs index 8aca1c6..8493e93 100755 --- a/LearnositySDK/Utils/JsonObjectFactory.cs +++ b/LearnositySDK/Utils/JsonObjectFactory.cs @@ -96,7 +96,7 @@ public static JsonObject fromJToken(JsonObject jsonObject, string key, JToken it jsonObject.set(key, (int)item); break; case JTokenType.Float: - jsonObject.set(key, (float)item); + jsonObject.set(key, (decimal)item); break; case JTokenType.String: jsonObject.set(key, (string)item); diff --git a/LearnositySDK/packages.config b/LearnositySDK/packages.config index 9b49c9e..64b5d8e 100644 --- a/LearnositySDK/packages.config +++ b/LearnositySDK/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file From 439d8cd8583c072eb1e99716522019bc1c79cc77 Mon Sep 17 00:00:00 2001 From: Gonzalo Zawadzki Date: Thu, 2 Nov 2017 18:44:33 -0300 Subject: [PATCH 2/5] Update unit tests to handle decimal numbers --- LearnositySDK.sln | 8 ++++++-- LearnositySDK/Utils/JsonObject.cs | 2 +- UnitTestProject1/CheckingEqualityUnitTests.cs | 6 +++--- UnitTestProject1/LearnositySDKUnitTests.csproj | 4 +++- UnitTestProject1/MergingObjectsUnitTests.cs | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/LearnositySDK.sln b/LearnositySDK.sln index 22ca26b..3eda81b 100755 --- a/LearnositySDK.sln +++ b/LearnositySDK.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LearnositySDK", "LearnositySDK\LearnositySDK.csproj", "{4A1F8BE2-02A2-424D-AE33-11F742E18EED}" EndProject @@ -17,6 +17,10 @@ Global {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Release|Any CPU.Build.0 = Release|Any CPU + {1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/LearnositySDK/Utils/JsonObject.cs b/LearnositySDK/Utils/JsonObject.cs index 55056ac..0c87410 100755 --- a/LearnositySDK/Utils/JsonObject.cs +++ b/LearnositySDK/Utils/JsonObject.cs @@ -627,7 +627,7 @@ public string toJson() } else if (this.dd.ContainsKey(key)) { - sb.Append(this.dd[key].ToString("R", CultureInfo.InvariantCulture)); + sb.Append(this.dd[key].ToString(CultureInfo.InvariantCulture)); } else if (this.ds.ContainsKey(key)) { diff --git a/UnitTestProject1/CheckingEqualityUnitTests.cs b/UnitTestProject1/CheckingEqualityUnitTests.cs index e017531..d9e448d 100644 --- a/UnitTestProject1/CheckingEqualityUnitTests.cs +++ b/UnitTestProject1/CheckingEqualityUnitTests.cs @@ -14,7 +14,7 @@ public class CheckingEqualityUnitTests [TestMethod] public void inputJSONEqualsOutput() { - string JSON = "{\"boolean\":true,\"integer\":1,\"float\":1.2,\"string\":\"string\",\"object\":{\"property\":null},\"array\":[null,[2]]}"; + string JSON = "{\"boolean\":true,\"integer\":1,\"decimal\":1.2,\"string\":\"string\",\"object\":{\"property\":null},\"array\":[null,[2]]}"; JsonObject jo = JsonObjectFactory.fromString(JSON); string outputJSON = jo.toJson(); @@ -45,7 +45,7 @@ public void inputJSONEqualsOutput() [TestMethod] public void JSONEqualityMethodWorksProperly() { - string JSON = "{\"boolean\":true,\"integer\":1,\"float\":1.2,\"string\":\"string\",\"object\":{\"property\":null},\"array\":[null,[2]]}"; + string JSON = "{\"boolean\":true,\"integer\":1,\"decimal\":1.2,\"string\":\"string\",\"object\":{\"property\":null},\"array\":[null,[2]]}"; // building a structure for comparison purposes JsonObject jo = new JsonObject(); @@ -54,7 +54,7 @@ public void JSONEqualityMethodWorksProperly() JsonObject jaInner = new JsonObject(true); jo.set("boolean", true); jo.set("integer", 1); - jo.set("float", 1.2f); + jo.set("decimal", 1.2m); jo.set("string", "string"); jo.set("object", joInner); jo.set("array", ja); diff --git a/UnitTestProject1/LearnositySDKUnitTests.csproj b/UnitTestProject1/LearnositySDKUnitTests.csproj index 67c0e00..3809b86 100644 --- a/UnitTestProject1/LearnositySDKUnitTests.csproj +++ b/UnitTestProject1/LearnositySDKUnitTests.csproj @@ -8,7 +8,7 @@ Properties UnitTestProject1 UnitTestProject1 - v3.5 + v4.5.2 512 {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 10.0 @@ -26,6 +26,7 @@ DEBUG;TRACE prompt 4 + false pdbonly @@ -34,6 +35,7 @@ TRACE prompt 4 + false diff --git a/UnitTestProject1/MergingObjectsUnitTests.cs b/UnitTestProject1/MergingObjectsUnitTests.cs index d999c4e..bb8e809 100644 --- a/UnitTestProject1/MergingObjectsUnitTests.cs +++ b/UnitTestProject1/MergingObjectsUnitTests.cs @@ -140,7 +140,7 @@ public void RecursiveMergingJSONObjectsWorksProperly() jo1a.setNull(); jo1a.set("string"); jo1a.set(1); - jo1a.set(1.2f); + jo1a.set(1.2m); jo1a.set(jo1ao1); jo1a.set(jo1ao2); jo1ao1.set("a", "a1"); @@ -158,7 +158,7 @@ public void RecursiveMergingJSONObjectsWorksProperly() jo2a.setNull(); jo2a.set("string"); jo2a.set(1); - jo2a.set(1.2f); + jo2a.set(1.2m); jo2a.set(jo2ao1); jo2a.set(jo2ao2); jo2ao1.set("a", "a2"); From de817028a58387703906b54354fc5346c65d4820 Mon Sep 17 00:00:00 2001 From: Gonzalo Zawadzki Date: Thu, 16 Nov 2017 15:11:21 -0300 Subject: [PATCH 3/5] Update to .Net Standard --- LearnositySDK-VS2010.sln | 20 ---- LearnositySDK.sln | 30 +++--- LearnositySDK/LearnositySDK.csproj | 86 ++-------------- LearnositySDK/Properties/AssemblyInfo.cs | 36 ------- LearnositySDK/packages.config | 4 - .../CheckingEqualityUnitTests.cs | 2 +- .../LearnositySDKUnitTests.cs | 2 +- .../LearnositySDKUnitTests.csproj | 23 +++++ .../MergingObjectsUnitTests.cs | 2 +- .../ToolIsEmptyUnitTests.cs | 2 +- .../LearnositySDKUnitTests.csproj | 99 ------------------- UnitTestProject1/Properties/AssemblyInfo.cs | 36 ------- 12 files changed, 53 insertions(+), 289 deletions(-) delete mode 100644 LearnositySDK-VS2010.sln delete mode 100755 LearnositySDK/Properties/AssemblyInfo.cs delete mode 100644 LearnositySDK/packages.config rename {UnitTestProject1 => LearnositySDKUnitTests}/CheckingEqualityUnitTests.cs (99%) rename {UnitTestProject1 => LearnositySDKUnitTests}/LearnositySDKUnitTests.cs (84%) create mode 100644 LearnositySDKUnitTests/LearnositySDKUnitTests.csproj rename {UnitTestProject1 => LearnositySDKUnitTests}/MergingObjectsUnitTests.cs (99%) rename {UnitTestProject1 => LearnositySDKUnitTests}/ToolIsEmptyUnitTests.cs (97%) delete mode 100644 UnitTestProject1/LearnositySDKUnitTests.csproj delete mode 100644 UnitTestProject1/Properties/AssemblyInfo.cs diff --git a/LearnositySDK-VS2010.sln b/LearnositySDK-VS2010.sln deleted file mode 100644 index 50f530e..0000000 --- a/LearnositySDK-VS2010.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LearnositySDK", "LearnositySDK\LearnositySDK.csproj", "{4A1F8BE2-02A2-424D-AE33-11F742E18EED}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/LearnositySDK.sln b/LearnositySDK.sln index 3eda81b..b9c5916 100755 --- a/LearnositySDK.sln +++ b/LearnositySDK.sln @@ -1,11 +1,14 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.27004.2009 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LearnositySDK", "LearnositySDK\LearnositySDK.csproj", "{4A1F8BE2-02A2-424D-AE33-11F742E18EED}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LearnositySDK", "LearnositySDK\LearnositySDK.csproj", "{DC1B295A-F21E-4A3C-A4DA-76130D281546}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LearnositySDKUnitTests", "UnitTestProject1\LearnositySDKUnitTests.csproj", "{1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LearnositySDKUnitTests", "LearnositySDKUnitTests\LearnositySDKUnitTests.csproj", "{29D6AB6C-C34D-4FAE-A433-E59C0B990DB6}" + ProjectSection(ProjectDependencies) = postProject + {DC1B295A-F21E-4A3C-A4DA-76130D281546} = {DC1B295A-F21E-4A3C-A4DA-76130D281546} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,16 +16,19 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A1F8BE2-02A2-424D-AE33-11F742E18EED}.Release|Any CPU.Build.0 = Release|Any CPU - {1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2}.Release|Any CPU.Build.0 = Release|Any CPU + {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Release|Any CPU.Build.0 = Release|Any CPU + {29D6AB6C-C34D-4FAE-A433-E59C0B990DB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29D6AB6C-C34D-4FAE-A433-E59C0B990DB6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29D6AB6C-C34D-4FAE-A433-E59C0B990DB6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29D6AB6C-C34D-4FAE-A433-E59C0B990DB6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3C8708D7-B4D7-4294-A8EE-854A68D6CDA4} + EndGlobalSection EndGlobal diff --git a/LearnositySDK/LearnositySDK.csproj b/LearnositySDK/LearnositySDK.csproj index 26e32c5..38976cf 100755 --- a/LearnositySDK/LearnositySDK.csproj +++ b/LearnositySDK/LearnositySDK.csproj @@ -1,83 +1,13 @@ - - + + - Debug - AnyCPU - 8.0.30703 - 2.0 - {4A1F8BE2-02A2-424D-AE33-11F742E18EED} - Library - Properties - LearnositySDK + netstandard2.0 LearnositySDK - v4.5.2 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false + LearnositySDK + - - False - ..\packages\Newtonsoft.Json.7.0.1\lib\net35\Newtonsoft.Json.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - \ No newline at end of file + + diff --git a/LearnositySDK/Properties/AssemblyInfo.cs b/LearnositySDK/Properties/AssemblyInfo.cs deleted file mode 100755 index 425bc72..0000000 --- a/LearnositySDK/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("LearnositySDK")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("LearnositySDK")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("add2acfb-b928-4f80-873a-cb7c5192d5e5")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/LearnositySDK/packages.config b/LearnositySDK/packages.config deleted file mode 100644 index 64b5d8e..0000000 --- a/LearnositySDK/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/UnitTestProject1/CheckingEqualityUnitTests.cs b/LearnositySDKUnitTests/CheckingEqualityUnitTests.cs similarity index 99% rename from UnitTestProject1/CheckingEqualityUnitTests.cs rename to LearnositySDKUnitTests/CheckingEqualityUnitTests.cs index d9e448d..e833e6c 100644 --- a/UnitTestProject1/CheckingEqualityUnitTests.cs +++ b/LearnositySDKUnitTests/CheckingEqualityUnitTests.cs @@ -3,7 +3,7 @@ using LearnositySDK.Utils; using Newtonsoft.Json.Linq; -namespace UnitTestProject1 +namespace LearnositySDKUnitTests { /// /// Summary description for CheckingEqualityUnitTests diff --git a/UnitTestProject1/LearnositySDKUnitTests.cs b/LearnositySDKUnitTests/LearnositySDKUnitTests.cs similarity index 84% rename from UnitTestProject1/LearnositySDKUnitTests.cs rename to LearnositySDKUnitTests/LearnositySDKUnitTests.cs index de800eb..8c365d2 100644 --- a/UnitTestProject1/LearnositySDKUnitTests.cs +++ b/LearnositySDKUnitTests/LearnositySDKUnitTests.cs @@ -2,7 +2,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using LearnositySDK.Utils; -namespace UnitTestProject1 +namespace LearnositySDKUnitTests { [TestClass] public class LearnositySDKUnitTests diff --git a/LearnositySDKUnitTests/LearnositySDKUnitTests.csproj b/LearnositySDKUnitTests/LearnositySDKUnitTests.csproj new file mode 100644 index 0000000..5bedb12 --- /dev/null +++ b/LearnositySDKUnitTests/LearnositySDKUnitTests.csproj @@ -0,0 +1,23 @@ + + + + netcoreapp2.0 + + false + + LearnositySDKUnitTests + + LearnositySDKUnitTests + + + + + + + + + + + + + diff --git a/UnitTestProject1/MergingObjectsUnitTests.cs b/LearnositySDKUnitTests/MergingObjectsUnitTests.cs similarity index 99% rename from UnitTestProject1/MergingObjectsUnitTests.cs rename to LearnositySDKUnitTests/MergingObjectsUnitTests.cs index bb8e809..2d3ae5d 100644 --- a/UnitTestProject1/MergingObjectsUnitTests.cs +++ b/LearnositySDKUnitTests/MergingObjectsUnitTests.cs @@ -3,7 +3,7 @@ using LearnositySDK.Utils; using Newtonsoft.Json.Linq; -namespace UnitTestProject1 +namespace LearnositySDKUnitTests { /// /// Summary description for MergingObjectsUnitTests diff --git a/UnitTestProject1/ToolIsEmptyUnitTests.cs b/LearnositySDKUnitTests/ToolIsEmptyUnitTests.cs similarity index 97% rename from UnitTestProject1/ToolIsEmptyUnitTests.cs rename to LearnositySDKUnitTests/ToolIsEmptyUnitTests.cs index 1ccdc6e..2879385 100644 --- a/UnitTestProject1/ToolIsEmptyUnitTests.cs +++ b/LearnositySDKUnitTests/ToolIsEmptyUnitTests.cs @@ -5,7 +5,7 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using LearnositySDK.Utils; -namespace UnitTestProject1 +namespace LearnositySDKUnitTests { /// /// Summary description for ToolIsEmptyUnitTests diff --git a/UnitTestProject1/LearnositySDKUnitTests.csproj b/UnitTestProject1/LearnositySDKUnitTests.csproj deleted file mode 100644 index 3809b86..0000000 --- a/UnitTestProject1/LearnositySDKUnitTests.csproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - Debug - AnyCPU - {1A1FFC7A-6BBA-4B37-8734-25A4AB46E0C2} - Library - Properties - UnitTestProject1 - UnitTestProject1 - v4.5.2 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - False - ..\packages\Newtonsoft.Json.7.0.1\lib\net35\Newtonsoft.Json.dll - - - - - - - - - - - - - - - - - - - - - - - - - {4a1f8be2-02a2-424d-ae33-11f742e18eed} - LearnositySDK - - - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file diff --git a/UnitTestProject1/Properties/AssemblyInfo.cs b/UnitTestProject1/Properties/AssemblyInfo.cs deleted file mode 100644 index 74562f4..0000000 --- a/UnitTestProject1/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("UnitTestProject1")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("UnitTestProject1")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("55ef8f41-ee3e-4ff0-b221-4bfa674126f0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] From ad507b54a5fd641fdd5611d302a8644529ad5353 Mon Sep 17 00:00:00 2001 From: Gonzalo Zawadzki Date: Fri, 24 Nov 2017 14:08:00 -0300 Subject: [PATCH 4/5] Update nuget package details --- LearnositySDK.sln | 4 ++-- LearnositySDK/LearnositySDK.csproj | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/LearnositySDK.sln b/LearnositySDK.sln index b9c5916..ad5affa 100755 --- a/LearnositySDK.sln +++ b/LearnositySDK.sln @@ -16,8 +16,8 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Debug|Any CPU.Build.0 = Release|Any CPU {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Release|Any CPU.ActiveCfg = Release|Any CPU {DC1B295A-F21E-4A3C-A4DA-76130D281546}.Release|Any CPU.Build.0 = Release|Any CPU {29D6AB6C-C34D-4FAE-A433-E59C0B990DB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU diff --git a/LearnositySDK/LearnositySDK.csproj b/LearnositySDK/LearnositySDK.csproj index 38976cf..75b502e 100755 --- a/LearnositySDK/LearnositySDK.csproj +++ b/LearnositySDK/LearnositySDK.csproj @@ -4,6 +4,18 @@ netstandard2.0 LearnositySDK LearnositySDK + LearnositySDK + 0.8.0 + Learnosity + Learnosity SDK for ASP.NET / C# + false + Update to .Net Standard + Copyright Learnosity 2017 (c) + learnosity sdk asp .net + + + + bin\Release\netstandard2.0\LearnositySDK.xml From 3cd3250a9e4aa52be40e40a7189dbb4138d868f8 Mon Sep 17 00:00:00 2001 From: Gonzalo Zawadzki Date: Thu, 7 Dec 2017 04:48:14 -0300 Subject: [PATCH 5/5] Update nuget package version and settings --- LearnositySDK/LearnositySDK.csproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LearnositySDK/LearnositySDK.csproj b/LearnositySDK/LearnositySDK.csproj index 75b502e..f8af2fc 100755 --- a/LearnositySDK/LearnositySDK.csproj +++ b/LearnositySDK/LearnositySDK.csproj @@ -12,6 +12,12 @@ Update to .Net Standard Copyright Learnosity 2017 (c) learnosity sdk asp .net + 0.8.0 + https://github.com/Learnosity/learnosity-sdk-asp.net/blob/master/LICENSE.md + https://github.com/Learnosity/learnosity-sdk-asp.net + https://www.learnosity.com/static/img/logos/learnositylogoforfacebook.jpg + https://www.learnosity.com/static/img/logos/learnositylogoforfacebook.jpg + true