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

            function.AddArgument(new HypnoGreen.Types.Text("denmark"));
            function.AddArgument(new HypnoGreen.Types.Text("nma"));
            Assert.AreEqual("Contains(\"denmark\", \"nma\")", function.ToString());
        }
Ejemplo n.º 2
0
        public void Evaluate_TextAndText_ReturnsFalse(string text, string substring)
        {
            var contains = new Contains();

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

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