예제 #1
0
        public void GetAllApplications_ReturnsApplications()
        {
            //  Arrange
            ConfigDataManager manager = new ConfigDataManager(mockContext.Object);

            //  Act
            var result = manager.GetAllApplications();

            //  Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(3, result.Count);
        }
예제 #2
0
        public ConfigResponse <List <string> > GetAllApplications()
        {
            ConfigResponse <List <string> > retval = new ConfigResponse <List <string> >();

            using (var db = new CentralConfigDb())
            {
                ConfigDataManager manager = new ConfigDataManager(db);
                retval.Data    = manager.GetAllApplications();
                retval.Status  = System.Net.HttpStatusCode.OK;
                retval.Message = "Applications found";
            }

            return(retval);
        }