Exemplo n.º 1
0
        public async Task TableTopProvinceTestNegative()
        {
            CovidStatsController controller = new CovidStatsController();

            ViewResult result = await controller.TableTopProvince("USA") as ViewResult;

            Assert.AreEqual("TableTopProvince", result.ViewName);
        }
Exemplo n.º 2
0
        public async Task TableTopProvinceTestNull()
        {
            CovidStatsController controller = new CovidStatsController();

            ViewResult result = await controller.TableTopProvince("US") as ViewResult;

            Assert.IsNotNull(result);
        }
Exemplo n.º 3
0
        public async Task TableTopRegionCorrectlyView()
        {
            CovidStatsController controller = new CovidStatsController();

            ViewResult result = await controller.TableTopRegion() as ViewResult;

            Assert.AreEqual("TableTopRegion", result.ViewName);
        }
Exemplo n.º 4
0
        public async Task TopCasesCovidTestCorrectlyView()
        {
            CovidStatsController controller = new CovidStatsController();

            ViewResult result = await controller.TopCasesCovid() as ViewResult;

            Assert.AreEqual("TopCasesCovid", result.ViewName);
        }
Exemplo n.º 5
0
        public async Task TableTopProvinceCorrectlyView()
        {
            CovidStatsController controller = new CovidStatsController();

            ViewResult result = await controller.TableTopProvince("USA") as ViewResult;

            List <CasesRegion> data = (List <CasesRegion>)result.ViewData.Model;

            Assert.AreEqual(10, data.Count);
        }
Exemplo n.º 6
0
        public async Task TopCasesCovidTestNull()
        {
            // Arrange
            CovidStatsController controller = new CovidStatsController();

            // Act
            ViewResult result = await controller.TopCasesCovid() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }