Exemplo n.º 1
0
        public void ToString_TextArgument_ReturnsExpected()
        {
            var function = new EndsWith();

            function.AddArgument(new HypnoGreen.Types.Text("denmark"));
            function.AddArgument(new HypnoGreen.Types.Text("ark"));
            Assert.AreEqual("EndsWith(\"denmark\", \"ark\")", function.ToString());
        }
Exemplo n.º 2
0
        public void Evaluate_TextAndText_ReturnsFalse(string text, string substring)
        {
            var endsWith = new EndsWith();

            endsWith.AddArgument(new HypnoGreen.Types.Text(text));
            endsWith.AddArgument(new HypnoGreen.Types.Text(substring));
            Assert.False(endsWith.EvaluateWithData <bool>());
        }
Exemplo n.º 3
0
        public void Evaluate_NullAndText_ReturnsFalse()
        {
            var endsWith = new EndsWith();

            endsWith.AddArgument(Null.Instance);
            endsWith.AddArgument(new HypnoGreen.Types.Text("denmark"));
            Assert.Throws <InvalidOperationException>(() =>
            {
                endsWith.EvaluateWithData();
            });
        }