示例#1
0
    public void SynchronizeWith(EffectorMgr target)
    {
        if (verNo == target.verNo)
        {
            return;
        }

        verNo = target.verNo;
        SetEffectorList(target.effectorList);
    }
示例#2
0
    public void RunEffectorsTest()
    {
        //Arrange
        MockEffector effector = new MockEffector();

        Effector[]  effectors   = { effector, effector, effector };
        EffectorMgr effectorMgr = new EffectorMgr(effectors);

        //Act
        effectorMgr.RunEffectors(target);

        //Assert
        Assert.AreEqual(3, runNo);
    }
示例#3
0
    public void UpdateEffectorsTestVerNo()
    {
        //Arrange
        MockEffector effector = new MockEffector();

        Effector[]  effectors   = { effector };
        EffectorMgr effectorMgr = new EffectorMgr(effectors, 2);

        //Act
        effectorMgr.UpdateEffectors(effector, effector, effector);

        //Assert
        Assert.AreEqual(3, effectorMgr.VerNo);
    }
示例#4
0
    public void SynchronizeWithTestVerNo()
    {
        //Arrange
        MockEffector effector = new MockEffector();

        Effector[]  srcEffectors = { effector, effector, effector };
        EffectorMgr srcMgr       = new EffectorMgr(srcEffectors, 3);
        EffectorMgr tarMgr       = new EffectorMgr();

        //Act
        tarMgr.SynchronizeWith(srcMgr);

        //Assert
        Assert.AreEqual(3, tarMgr.VerNo);
    }
示例#5
0
    public void SynchronizeWithTestTrue()
    {
        //Arrange
        MockEffector effector = new MockEffector();

        Effector[]  srcEffectors = { effector, effector, effector };
        EffectorMgr srcMgr       = new EffectorMgr(srcEffectors);
        EffectorMgr tarMgr       = new EffectorMgr();

        //Act
        tarMgr.SynchronizeWith(srcMgr);
        tarMgr.RunEffectors(target);

        //Assert
        Assert.AreEqual(3, runNo);
    }
示例#6
0
 void InitEffectorMgr(Effector[] effectors)
 {
     effectorMgr = new EffectorMgr(effectors);
 }
示例#7
0
 public void SynchronizeWith(EffectorMgr target)
 {
     effectorMgr.SynchronizeWith(target);
 }
示例#8
0
 void InitEffectorMgr()
 {
     effectorMgr = new EffectorMgr(this);
 }