Ejemplo n.º 1
0
        public ActionResult InitiativeList()
        {
            var provider = new InitiativeProvider();
            var model    = new InitiativesModel
            {
                Initiatives = provider.GetAllInitiatives()
            };

            return(View(model));
        }
Ejemplo n.º 2
0
        public void GetAllInitiativesForInitiativeProvider_Success()
        {
            // Arrange
            var mokAdapter = new Initiative.AdapterBuilder().GetAllInitiatives().Build();
            var provider   = new InitiativeProvider(mokAdapter);

            // Act
            var response = provider.GetAllInitiatives();

            // Assert
            Assert.IsNotNull(response);
            Assert.IsTrue(response.Count() == 2, "Did not return the expected 2 initiatives");
        }