public void QualityRank_GetHighetstRankOf_GivenUsageArrayAndComponent_ShouldReturnHighestQuality()
        {
            var use = new Usage[] { Usage.Business, Usage.Gaming };

            var result = UsageQualityRank.GetHighetstRankOf(use, ComponentType.HardDrive);

            Assert.AreEqual(result, Quality.Best);

            use    = new Usage[] { Usage.General, Usage.Programming };
            result = UsageQualityRank.GetHighetstRankOf(use, ComponentType.VideoCard);

            Assert.AreEqual(result, Quality.Good);
        }
        private IComponentRecommendationEngine GetFakeEngineFor(ComponentType type, Usage[] usage, decimal highPrice)
        {
            var quality            = UsageQualityRank.GetHighetstRankOf(usage, type);
            var componentHighPrice = UsageProfiles.GetPricePercentage(type, usage) * highPrice;
            var fakeEngine         = new Mock <IComponentRecommendationEngine>();

            fakeEngine
            .Setup(x => x.GetRecommendedComponent(
                       It.IsAny <Usage[]>(),
                       It.IsAny <decimal>()))
            .Returns((Usage[] u, decimal d) =>
                     new Component {
                Category = type,
                Quality  = quality,
                Price    = componentHighPrice - 50.00M
            });

            return(fakeEngine.Object);
        }