Beispiel #1
0
        public void TestIfDeleteSportCallsDeleteSportInRepo()
        {
            // Arrange

            var repo    = new Mock <ISportRepository>();
            var manager = new SportAccess(repo.Object);


            // Act

            manager.DeleteSport(It.IsAny <int>());


            // Assert

            repo.Verify(x => x.DeleteSport(It.IsAny <int>()), Times.Exactly(1));
        }
Beispiel #2
0
        public void TestIfGetArchivedSportsCallsGetArchivedSportsInRepo()
        {
            // Arrange

            var repo    = new Mock <ISportRepository>();
            var manager = new SportAccess(repo.Object);


            // Act

            manager.GetArchivedSports();


            // Assert

            repo.Verify(x => x.GetArchivedSports(), Times.Exactly(1));
        }