Exemplo n.º 1
0
        public void Object_JoinAsString_stringizer_Test()
        {
            var list = new HasAnInt[]
            {
                new HasAnInt {
                    Integer = 42
                },
                new HasAnInt {
                    Integer = 23
                },
            };

            var joined = list.JoinAsString(",", _obj => $"({_obj.Integer * 2})");

            Assert.AreEqual("(84),(46)", joined);
        }
Exemplo n.º 2
0
        public void Object_JoinAsString_Test()
        {
            var list = new HasAnInt[]
            {
                new HasAnInt {
                    Integer = 42
                },
                new HasAnInt {
                    Integer = 23
                },
            };

            var joined = list.JoinAsString(" ");

            Assert.AreEqual("[42] [23]", joined);
        }