Ejemplo 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);
    }
Ejemplo 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);
        }
Ejemplo n.º 3
0
        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);
        }