Esempio n. 1
0
        public void Test1()
        {
            Logger logger = new Logger();

            // logging string "foo" at timestamp 1
            var t1 = logger.ShouldPrintMessage(1, "foo"); //returns true;

            // logging string "bar" at timestamp 2
            var t2 = logger.ShouldPrintMessage(2, "bar"); //returns true;

            // logging string "foo" at timestamp 3
            var t3 = logger.ShouldPrintMessage(3, "foo"); //returns false;

            // logging string "bar" at timestamp 8
            var t4 = logger.ShouldPrintMessage(8, "bar"); //returns false;

            // logging string "foo" at timestamp 10
            var t5 = logger.ShouldPrintMessage(10, "foo"); //returns false;

            // logging string "foo" at timestamp 11
            var t6 = logger.ShouldPrintMessage(11, "foo"); //returns true;

            Assert.Pass();
        }