public void GetBackgroundPage_ForInvalidPage_ThrowsArgumentException(int invalidPageNumber)
        {
            int numPages   = 1;
            var pageMapper = new BackgroundPageMapper(1, new BackgroundPage(), 0, 0);

            int bgPage;

            Assert.Throws <ArgumentException>(() => pageMapper.GetBackgroundPageNumber(invalidPageNumber, numPages, out bgPage));
        }
        private int MapPage(int page, int numPages, BackgroundPageMapper mapper)
        {
            int bgPage;

            if (!mapper.GetBackgroundPageNumber(page, numPages, out bgPage))
            {
                return(-1);
            }

            return(bgPage);
        }