コード例 #1
0
        public void DeleteValidAthlete()
        {
            //Act
            var actual = (Athlete)controller.Delete(1).Model;

            //Assert
            Assert.AreEqual(athletes.ToList()[0], actual);
        }
コード例 #2
0
        public void DeleteNoId()
        {
            // act
            ViewResult result = (ViewResult)controller.Delete(null);

            // assert
            Assert.AreEqual("Error", result.ViewName);
        }
コード例 #3
0
 public void DeleteAthleteInvalidId()
 {
     athletesController.Delete(-100);//should not throw exception
 }