示例#1
0
    // Use this for initialization
    void Start()
    {
        Player p = new Player();

        p.timerManager = tmanager;
        Data           = new BridgeData(p);
        bmanager       = new BuffManager(Data);

        var b = new Protection(bmanager, 10);

        b.AddEffect();
        b = new Protection(bmanager, 5);
        b.AddEffect();

        It1 t1 = p as It1;

        p.Reset();
        It2 t2 = p as It2;

        p.Reset();

        AtlasManager.Cache(new string[] { "test", "dd" });

        InvokeRepeating("t", 0, 1);
        // Invoke("tt",5);
    }
示例#2
0
        public void InitConsole_JobIdIsAddedToHash()
        {
            var storage = new ConsoleStorage(_connection.Object);

            storage.InitConsole(_consoleId);

            _connection.Verify(x => x.CreateWriteTransaction(), Times.Once);
            _transaction.Verify(x => x.SetRangeInHash(_consoleId.GetHashKey(), It2.AnyIs <KVP>(p => p.Key == "jobId")));
            _transaction.Verify(x => x.Commit(), Times.Once);
        }
示例#3
0
        public void AddLine_ProgressBarIsAddedToSet_AndProgressIsUpdated()
        {
            var storage = new ConsoleStorage(_connection.Object);
            var line    = new ConsoleLine()
            {
                Message       = "1",
                ProgressValue = 10
            };

            storage.AddLine(_consoleId, line);

            Assert.False(line.IsReference);
            _connection.Verify(x => x.CreateWriteTransaction(), Times.Once);
            _transaction.Verify(x => x.AddToSet(_consoleId.GetSetKey(), It.IsAny <string>(), It.IsAny <double>()));
            _transaction.Verify(x => x.SetRangeInHash(_consoleId.GetHashKey(), It2.AnyIs <KVP>(p => p.Key == "progress")));
            _transaction.Verify(x => x.Commit(), Times.Once);
        }
示例#4
0
        public void AddLine_LongLineIsAddedToHash_AndReferenceIsAddedToSet()
        {
            var storage = new ConsoleStorage(_connection.Object);
            var line    = new ConsoleLine()
            {
                Message = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor " +
                          "incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud " +
                          "exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure " +
                          "dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. " +
                          "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
            };

            storage.AddLine(_consoleId, line);

            Assert.True(line.IsReference);
            _connection.Verify(x => x.CreateWriteTransaction(), Times.Once);
            _transaction.Verify(x => x.AddToSet(_consoleId.GetSetKey(), It.IsAny <string>(), It.IsAny <double>()));
            _transaction.Verify(x => x.SetRangeInHash(_consoleId.GetHashKey(), It2.AnyIs <KVP>(p => p.Key == line.Message)));
            _transaction.Verify(x => x.Commit(), Times.Once);
        }