예제 #1
0
        public void addItem_should_add_item_to_itemList()
        {
            // When
            SUT.AddItem("My text");

            // Then
            Assert.AreEqual(1, SUT.ItemList.Count());
            CollectionAssert.Contains(SUT.ItemList[0].Elements, new TextBody("My text"));
        }
        public void generate_should_return_code_with_several_items()
        {
            // Given
            var enumerate = new Enumerate();

            enumerate.AddItem("My item");
            enumerate.AddItem("My second item");

            // When
            var result = SUT.Generate(enumerate);

            // Then
            Assert.AreEqual(@"\begin{enumerate}" + "\n\t" +
                            @"\item My item" + "\n \t" +
                            @"\item My second item" + "\n" +
                            @" \end{enumerate}" + "\n", result);
        }