public void Dispose()
 {
     HttpContext.Current = null;
     dataContext.Dispose();
     context.Dispose();
     logger.Dispose();
 }
        public void Dispose_Context()
        {
            TestingContext context = Substitute.For <TestingContext>();
            AuditLogger    logger  = new AuditLogger(context);

            logger.Dispose();

            context.Received().Dispose();
        }
Esempio n. 3
0
        public void Dispose_Context()
        {
            TestingContext context = Substitute.For<TestingContext>();
            AuditLogger logger = new AuditLogger(context);

            logger.Dispose();

            context.Received().Dispose();
        }
        public void Dispose_DisposesContext()
        {
            DbContext context = Substitute.For <DbContext>();

            logger = Substitute.ForPartsOf <AuditLogger>(context);

            logger.Dispose();

            context.Received().Dispose();
        }
Esempio n. 5
0
 public void Dispose()
 {
     context.Dispose();
     logger.Dispose();
 }
 public void Dispose()
 {
     dataContext.Dispose();
     context.Dispose();
     logger.Dispose();
 }
Esempio n. 7
0
 public void Dispose_CanBeCalledMultipleTimes()
 {
     logger.Dispose();
     logger.Dispose();
 }