예제 #1
0
        public void ResultData_Read_InValid_Data_Bogus_Should_Fail()
        {
            // Arrange
            var myController = new ResultDataController();

            // Act
            var result = myController.Read("bogus");

            // Assert
            Assert.IsNotNull(result);
        }
예제 #2
0
        public void ResultData_Read_Valid_Data_Should_Pass()
        {
            // Arrange
            var myController = new ResultDataController();
            var myData       = BiliWeb.Backend.ResultDataBackend.Instance.Index().FirstOrDefault();

            // Act
            var result = myController.Read(myData.ID) as ViewResult;

            // Assert
            Assert.IsNotNull(result.Model);
        }
예제 #3
0
        public void ResultData_Read_Get_Data_Null_Should_Fail()
        {
            // Arrange
            var myController = new ResultDataController();

            // Act
            var result = myController.Read(null);

            // Reset

            // Assert
            Assert.IsNotNull(result);
        }
예제 #4
0
        public void ResultData_Read_Get_InValid_Data_Null_Should_Fail()
        {
            // Arrange
            var myController = new ResultDataController();

            // Act
            var result = (NotFoundResult)myController.Read(null);

            // Reset

            // Assert
            Assert.AreEqual(404, result.StatusCode);
        }