Exemple #1
0
        public IHttpActionResult GetPhoneTypeMaster()
        {
            var user = _PhoneTypeService.GetAll();

            if (user == null)
            {
                return(NotFound());
            }

            return(Ok(user));
            // return user;
        }
Exemple #2
0
        public void GetAll_Test()
        {
            // Arrange
            TestKolgraphEntities context = new TestKolgraphEntities();
            var repository = new PhoneTypeRepository(context);
            var service    = new PhoneTypeService(repository);

            // Act
            IEnumerable <PhoneTypeModel> result = service.GetAll();

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(context.phoneType.Count(), result.Count());
        }