示例#1
0
        public async Task GETCount_ReturnsJObject_WithCorrectValue()
        {
            var result = (await Controller.GET_Count()).Value;
            int?count  = (int?)result?["data"]?["count"];

            Assert.AreEqual(count, await StarsTracker.GetCount());
        }
示例#2
0
        public async Task POSTIncrement_IncrementsValue_ByOneWhenCalledWithNoValues()
        {
            long before = await StarsTracker.GetCount();

            await Controller.POST_Increment();

            long after = await StarsTracker.GetCount();

            Assert.AreEqual(1, after - before);
        }
示例#3
0
        public async Task POSTIncrement_IncrementsValue_ByCorrectAmount(int incrementationAmount)
        {
            long before = await StarsTracker.GetCount();

            await Controller.POST_Increment(incrementationAmount);

            long after = await StarsTracker.GetCount();

            Assert.AreEqual(incrementationAmount, after - before);
        }