Skip to content

Commit 668b29c

Browse files
Use generic types where we can
1 parent e9288de commit 668b29c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/client/Unit/src/unit/TestFieldTableFormattingGeneric.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ public void TestStandardTypes()
7272
array.Add(1234);
7373
t["fieldarray"] = array;
7474
WireFormatting.WriteTable(w, t);
75-
IDictionary nt = (IDictionary)WireFormatting.ReadTable(Reader(Contents(w)));
75+
IDictionary<string, object> nt = WireFormatting.ReadTable(Reader(Contents(w)));
7676
Assert.AreEqual(Encoding.UTF8.GetBytes("Hello"), nt["string"]);
7777
Assert.AreEqual(1234, nt["int"]);
7878
Assert.AreEqual(12.34m, nt["decimal"]);
7979
Assert.AreEqual(0, ((AmqpTimestamp)nt["timestamp"]).UnixTime);
80-
IDictionary nt2 = (IDictionary)nt["fieldtable"];
80+
IDictionary<string, object> nt2 = (IDictionary<string, object>)nt["fieldtable"];
8181
Assert.AreEqual(Encoding.UTF8.GetBytes("test"), nt2["test"]);
82-
IList narray = (IList)nt["fieldarray"];
82+
IList<object> narray = (IList<object>)nt["fieldarray"];
8383
Assert.AreEqual(Encoding.UTF8.GetBytes("longstring"), narray[0]);
8484
Assert.AreEqual(1234, narray[1]);
8585
}

0 commit comments

Comments
 (0)