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); }
public void ShouldAddFunctionWithType() { FunctionTable table = new FunctionTable(); table.AddFunction("test", typeof(TestFunction)); Assert.Single(table); Assert.True(table.Contains("test")); Assert.Equal("test", table.First().Key); Assert.Equal(typeof(TestFunction), table.First().Value); }