public void ShouldReturnResultOnValidAnalyzeCall()
        {
            int min = 100;
            int max = 50;
            Mock <IAnalysisResult> analysisResultMock = new Mock <IAnalysisResult>();

            Mock <IQuantityAnalysisResultFactory> quantityAnalysisResultFactoryMock = new Mock <IQuantityAnalysisResultFactory>();

            quantityAnalysisResultFactoryMock.Setup(m => m.CreateInstance(It.IsAny <int>(), It.IsAny <int>(), It.IsAny <bool>())).Returns(analysisResultMock.Object);
            Mock <IQuantitySearch> quantitySearchMock = new Mock <IQuantitySearch>();

            quantitySearchMock.Setup(m => m.Search(It.IsAny <IDNA>())).Returns(100);
            List <IQuantitySearch> listOfQuantitySearch = new List <IQuantitySearch>()
            {
                quantitySearchMock.Object
            };

            QuantityAnalysis quantityAnalysis = new QuantityAnalysis(min, max, quantityAnalysisResultFactoryMock.Object, listOfQuantitySearch);

            Mock <IDNA> dnaMock = new Mock <IDNA>();

            dnaMock.Setup(m => m.IsValid()).Returns(true);
            IAnalysisResult analysisResult = quantityAnalysis.Analyze(dnaMock.Object);

            Assert.AreEqual(analysisResult, analysisResultMock.Object);
        }
        public void ShouldThrowExceptionWhenDNAIsInvalid()
        {
            int min = 100;
            int max = 50;
            Mock <IQuantityAnalysisResultFactory> quantityAnalysisResultFactoryMock = new Mock <IQuantityAnalysisResultFactory>();
            Mock <IQuantitySearch> quantitySearchMock   = new Mock <IQuantitySearch>();
            List <IQuantitySearch> listOfQuantitySearch = new List <IQuantitySearch>()
            {
                quantitySearchMock.Object
            };

            QuantityAnalysis quantityAnalysis = new QuantityAnalysis(min, max, quantityAnalysisResultFactoryMock.Object, listOfQuantitySearch);

            Mock <IDNA> dnaMock = new Mock <IDNA>();

            dnaMock.Setup(m => m.IsValid()).Returns(false);
            quantityAnalysis.Analyze(dnaMock.Object);
        }