コード例 #1
0
        public void StudentUnitTest()
        {   //Arrange:Initialise objects and sets the value of sample data used in the method being tested
            StudentUnitTestController controller = new StudentUnitTestController();
            //Act:Invoke the method being tested
            IActionResult result = controller.Index() as IActionResult;

            //Assert: Verify the tested method behaves as expected
            Assert.IsNotNull(result);
        }
コード例 #2
0
ファイル: UnitTest1.cs プロジェクト: MyICTSample/School
        public void StudentUnitTest()
        {//Arrange
            StudentUnitTestController controller = new StudentUnitTestController();
            //Act
            IActionResult result = controller.Index() as IActionResult;

            //Assert
            Assert.IsNotNull(result);
        }