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()); }
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); }
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); }