bump nuget packages
diff --git a/lib/netstd/Tests/Thrift.Tests/Protocols/TJsonProtocolHelperTests.cs b/lib/netstd/Tests/Thrift.Tests/Protocols/TJsonProtocolHelperTests.cs
index 03e3efa..c05ee4d 100644
--- a/lib/netstd/Tests/Thrift.Tests/Protocols/TJsonProtocolHelperTests.cs
+++ b/lib/netstd/Tests/Thrift.Tests/Protocols/TJsonProtocolHelperTests.cs
@@ -49,22 +49,20 @@
foreach (var t in sets)
{
- Assert.IsTrue(TJSONProtocolHelper.GetTypeNameForTypeId(t.Item1) == t.Item2, $"Wrong mapping of TypeName {t.Item2} to TType: {t.Item1}");
+ Assert.AreEqual(t.Item2, TJSONProtocolHelper.GetTypeNameForTypeId(t.Item1), $"Wrong mapping of TypeName {t.Item2} to TType: {t.Item1}");
}
}
[TestMethod]
- [ExpectedException(typeof(TProtocolException))]
public void GetTypeNameForTypeId_TStop_Test()
{
- TJSONProtocolHelper.GetTypeNameForTypeId(TType.Stop);
+ Assert.ThrowsExactly<TProtocolException>(() => TJSONProtocolHelper.GetTypeNameForTypeId(TType.Stop));
}
[TestMethod]
- [ExpectedException(typeof(TProtocolException))]
public void GetTypeNameForTypeId_NonExistingTType_Test()
{
- TJSONProtocolHelper.GetTypeNameForTypeId((TType)100);
+ Assert.ThrowsExactly<TProtocolException>(() => TJSONProtocolHelper.GetTypeNameForTypeId((TType)100));
}
[TestMethod]
@@ -88,29 +86,26 @@
foreach (var t in sets)
{
- Assert.IsTrue(TJSONProtocolHelper.GetTypeIdForTypeName(t.Item2) == t.Item1, $"Wrong mapping of TypeName {t.Item2} to TType: {t.Item1}");
+ Assert.AreEqual(t.Item1, TJSONProtocolHelper.GetTypeIdForTypeName(t.Item2), $"Wrong mapping of TypeName {t.Item2} to TType: {t.Item1}");
}
}
[TestMethod]
- [ExpectedException(typeof(TProtocolException))]
public void GetTypeIdForTypeName_TStopTypeName_Test()
{
- TJSONProtocolHelper.GetTypeIdForTypeName([(byte)TType.Stop, (byte)TType.Stop]);
+ Assert.ThrowsExactly<TProtocolException>(() => TJSONProtocolHelper.GetTypeIdForTypeName([(byte)TType.Stop, (byte)TType.Stop]));
}
[TestMethod]
- [ExpectedException(typeof(TProtocolException))]
public void GetTypeIdForTypeName_NonExistingTypeName_Test()
{
- TJSONProtocolHelper.GetTypeIdForTypeName([100]);
+ Assert.ThrowsExactly<TProtocolException>(() => TJSONProtocolHelper.GetTypeIdForTypeName([100]));
}
[TestMethod]
- [ExpectedException(typeof(TProtocolException))]
public void GetTypeIdForTypeName_EmptyName_Test()
{
- TJSONProtocolHelper.GetTypeIdForTypeName([]);
+ Assert.ThrowsExactly<TProtocolException>(() => TJSONProtocolHelper.GetTypeIdForTypeName([]));
}
[TestMethod]
@@ -125,7 +120,7 @@
foreach (var t in sets)
{
- Assert.IsTrue(TJSONProtocolHelper.IsJsonNumeric(t.Item1) == t.Item2, $"Wrong mapping of Char {t.Item1} to bool: {t.Item2}");
+ Assert.AreEqual(t.Item2, TJSONProtocolHelper.IsJsonNumeric(t.Item1), $"Wrong mapping of Char {t.Item1} to bool: {t.Item2}");
}
}
@@ -141,15 +136,14 @@
foreach (var t in sets)
{
var actualResult = TJSONProtocolHelper.ToHexVal((byte)t.Item1);
- Assert.IsTrue(actualResult == t.Item2, $"Wrong mapping of char byte {t.Item1} to it expected hex value: {t.Item2}. Actual hex value: {actualResult}");
+ Assert.AreEqual(t.Item2, actualResult, $"Wrong mapping of char byte {t.Item1} to it expected hex value: {t.Item2}. Actual hex value: {actualResult}");
}
}
[TestMethod]
- [ExpectedException(typeof(TProtocolException))]
public void ToHexVal_WrongInputChar_Test()
{
- TJSONProtocolHelper.ToHexVal((byte)'s');
+ Assert.ThrowsExactly<TProtocolException>(() => TJSONProtocolHelper.ToHexVal((byte)'s'));
}
[TestMethod]
@@ -164,8 +158,8 @@
foreach (var t in sets)
{
- var actualResult = TJSONProtocolHelper.ToHexChar(t.Item1);
- Assert.IsTrue(actualResult == t.Item2, $"Wrong mapping of hex value {t.Item1} to it expected char: {t.Item2}. Actual hex value: {actualResult}");
+ var actualResult = (char)TJSONProtocolHelper.ToHexChar(t.Item1);
+ Assert.AreEqual(t.Item2, actualResult, $"Wrong mapping of hex value {t.Item1} to it expected char: {t.Item2}. Actual hex value: {actualResult}");
}
}
}