示例#1
0
文件: UnitTest1.cs 项目: B3nCr/DOJO4
        public void Test1()
        {
            var diamondBuilder = new DiamondBuilder();
            var result         = diamondBuilder.Build('A');

            Assert.Equal(new string[] { "A" }, result);
        }
示例#2
0
文件: UnitTest1.cs 项目: B3nCr/DOJO4
        public void Should_return_three_letters_with_spaces()
        {
            var diamondBuilder = new DiamondBuilder();

            var result = new string[] { "C   C", " B B ", "  A  " };

            Assert.Equal(result, diamondBuilder.Build('C'));
        }
示例#3
0
文件: UnitTest1.cs 项目: B3nCr/DOJO4
        public void TestForD()
        {
            var diamondBuilder = new DiamondBuilder();

            var result = new string[]
            {
                "D     D",
                " C   C ",
                "  B B  ",
                "   A   "
            };

            Assert.Equal(result, diamondBuilder.Build('D'));
        }
示例#4
0
文件: UnitTest1.cs 项目: B3nCr/DOJO4
        public void MidPointContainsInternalPadding()
        {
            var diamondBuilder = new DiamondBuilder();

            Assert.Equal("B B", diamondBuilder.Build('B')[1]);
        }
示例#5
0
文件: UnitTest1.cs 项目: B3nCr/DOJO4
        public void Should_return_two_letters()
        {
            var diamondBuilder = new DiamondBuilder();

            Assert.StartsWith("B", diamondBuilder.Build('B')[0]);
        }