public void SequenceCalculationController_GenerateSequences_Can_CreateSequenceGenerators_And_InvokeGetSequence()
        {
            //Arrange
            ISequenceGeneratorFactory mockFactory = MockRepository.GenerateMock<ISequenceGeneratorFactory>();
            ISequenceGenerator mockGenerator = MockRepository.GenerateMock<ISequenceGenerator>();
            SequenceCalculationController controller = new SequenceCalculationController(mockFactory);
            List<ISequenceGenerator> generators = new List<ISequenceGenerator>();
            generators.Add(mockGenerator);

            GetSequenceInputViewModel inputVM = new GetSequenceInputViewModel();
            inputVM.Input = 10;

            mockFactory.Expect(f => f.GetSequenceGenerators())
                .Return(generators);

            mockGenerator.Expect(g => g.Name).Return("Test Sequence");
            string[] testSequence = { "1", "2", "3"};
            mockGenerator.Expect(g => g.GetSequence(inputVM.Input)).Return(testSequence);

            //Act
            ViewResult result = controller.GenerateSequences(inputVM) as ViewResult;

            //Assert
            mockFactory.VerifyAllExpectations();
            mockGenerator.VerifyAllExpectations();

            Assert.AreEqual(inputVM, result.ViewBag.GetSequenceInputViewModel);
            Assert.AreEqual(1, ((NumericSequenceViewModel)(result.ViewData.Model)).Sequences.Count);
            Assert.IsTrue(((Dictionary<string, IEnumerable<string>>)(((NumericSequenceViewModel)(result.ViewData.Model)).Sequences)).ContainsKey("Test Sequence"));
            Assert.AreEqual(testSequence, ((Dictionary<string, IEnumerable<string>>)(((NumericSequenceViewModel)(result.ViewData.Model)).Sequences))["Test Sequence"]);
        }
        public void SequenceCalculationController_Index()
        {
            // Arrange
            ISequenceGeneratorFactory mockFactory = MockRepository.GenerateMock<ISequenceGeneratorFactory>();
            SequenceCalculationController controller = new SequenceCalculationController(mockFactory);

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }