public void ShouldAddFunctionWithType() { FunctionTable table = new FunctionTable(); table.AddFunction("test", typeof(TestFunction)); Assert.AreEqual<int>(1, table.Count()); Assert.IsTrue(table.Contains("test")); Assert.AreEqual<string>("test", table.First().Key); Assert.AreEqual<Type>(typeof(TestFunction), table.First().Value); }
public void ShouldAddFunctionWithType() { FunctionTable table = new FunctionTable(); table.AddFunction("test", typeof(TestFunction)); Assert.AreEqual <int>(1, table.Count()); Assert.IsTrue(table.Contains("test")); Assert.AreEqual <string>("test", table.First().Key); Assert.AreEqual <Type>(typeof(TestFunction), table.First().Value); }