Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
        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);
        }