Example #1
0
        public void TestSchedulAfterEnd()
        {
            TestingAutoupdateRegister register = new TestingAutoupdateRegister(2);
            Mock <IAutoupdateable>    mock     = new Mock <IAutoupdateable>();

            register.Register(mock.Object, 2);
            register.Tick();
            register.Tick();

            Assert.Equal(mock.Object, register.PublicCurrentUpdateRequests[0]);
        }
Example #2
0
        public void TestTickAfterEnd()
        {
            TestingAutoupdateRegister register = CreateSmallRegisterWithOneObject();

            register.Tick();
            List <IAutoupdateable> list = register.PublicCurrentUpdateRequests;

            register.Tick();
            register.Tick();

            Assert.Equal(list, register.PublicCurrentUpdateRequests);
        }
        public void TestRegisterAndGet()
        {
            TestingAutoupdateRegister register = new TestingAutoupdateRegister(2);
            Mock<IAutoupdateableGameActor> mock = new Mock<IAutoupdateableGameActor>();
            register.Register(mock.Object, 1);
            register.Tick();

            Assert.Equal(mock.Object, register.PublicCurrentUpdateRequests[0]);
        }
Example #4
0
        public void TestRegisterAndGet()
        {
            TestingAutoupdateRegister       register = new TestingAutoupdateRegister(2);
            Mock <IAutoupdateableGameActor> mock     = new Mock <IAutoupdateableGameActor>();

            register.Register(mock.Object, 1);
            register.Tick();

            Assert.Equal(mock.Object, register.PublicCurrentUpdateRequests[0]);
        }