package com.qmth.distributed.print;

import com.qmth.teachcloud.common.util.RedisCounterUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;

/**
 * redis计数器测试类
 */
@SpringBootTest
@RunWith(SpringRunner.class)
public class RedisCounterTest {
    @Resource
    private RedisCounterUtil redisCounterUtil;

    @Test
    public void test() {
        Long schoolId = 1L;
        String key = "packageCode";
        String counter1 = redisCounterUtil.getCounter(schoolId, 5, key);
        System.out.println("counter1:" + counter1);
    }

}
