public virtual StringBuilder Represent(BulletsContainer text, ILanguage language)
 {
     return(representContainer(
                text,
                language,
                (lineNumber, lineCount) => " * "));
 }
Пример #2
0
        public void CreateEmptyBulletsContainer()
        {
            // act
            var container = new BulletsContainer();

            // assert
            Assert.AreEqual(0, container.Items.Count);
        }
Пример #3
0
 public virtual StringBuilder Represent(BulletsContainer text, ILanguage language)
 {
     return(representContainer(
                text,
                language,
                "<ul>",
                "</ul>",
                "<li>",
                "</li>"));
 }
Пример #4
0
 public LuaScriptFacade(Lua script, GameObject bulletrepo, GameObject origin, GameObject defaultBullet, TypeMethods luatype)
 {
     this.script  = script;
     this.luatype = luatype;
     container    = new BulletsContainer(defaultBullet, origin);
     luainit      = new InitializerMethods(container, bulletrepo);
     luafire      = new FiringMethods();
     initroutine  = script.GetFunction("Initialize");
     fireroutine  = script.GetFunction("Fire");
 }
Пример #5
0
        public void CreateOneItemBulletsContainer()
        {
            // arrange
            var item = new SpaceText();

            // act
            var container = new BulletsContainer(item);

            // assert
            Assert.AreSame(item, container.Items.Single());
        }
Пример #6
0
        public void CreateManyItemsBulletsContainer()
        {
            // arrange
            var items = new List <IText>
            {
                new SpaceText(),
                new LineBreakText(),
                new FormattedText(language => string.Empty),
            };

            // act
            var container = new BulletsContainer(items);

            // assert
            Assert.IsTrue(items.SequenceEqual(container.Items));
        }
Пример #7
0
 public InitializerMethods(BulletsContainer container, GameObject bulletrepo)
 {
     this.container = container;
 }