Exemplo n.º 1
0
        public void Literal_returns_bool()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("true", code.Literal(true));
            Assert.Equal("false", code.Literal(false));
        }
        public void Literal_returns_bool()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("true", code.Literal(true));
            Assert.Equal("false", code.Literal(false));
        }
        public void Literal_returns_int()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("42", code.Literal(42));
        }
        public void Literal_returns_string()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("\"One\"", code.Literal("One"));
        }
        public void Literal_returns_string_array_when_more_than_one()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("new[] { \"One\", \"Two\" }", code.Literal(new[] { "One", "Two" }));
        }
        public void Literal_returns_string_when_one()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("\"One\"", code.Literal(new[] { "One" }));
        }
Exemplo n.º 7
0
        public void Literal_returns_int()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("42", code.Literal(42));
        }
Exemplo n.º 8
0
        public void Literal_returns_string()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("\"One\"", code.Literal("One"));
        }
Exemplo n.º 9
0
        public void Literal_returns_string_array_when_more_than_one()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("new[] { \"One\", \"Two\" }", code.Literal(new[] { "One", "Two" }));
        }
Exemplo n.º 10
0
        public void Literal_returns_string_when_one()
        {
            var code = new CSharpCodeHelper();

            Assert.Equal("\"One\"", code.Literal(new[] { "One" }));
        }