예제 #1
0
        public void Use_CallsScriptExecutorWithItemScript()
        {
            var item = GetTestItem();

            item.Get <Item>().UseScript = "TestScript";

            prototypeSystem.Get("TestScript").Returns(new Entity(999, "TestScript", new [] { new Script {
                                                                                                 Text = "hello world"
                                                                                             } }));

            itemSystem.Use(entity, item);

            scriptExecutor.Received(1).Execute(entity, "hello world", item, null);
        }