예제 #1
0
        public IValidationResult Validate(WorkMethodology data)
        {
            validateCode(data.Code);
            validateName(data.Name);

            return(this);
        }
        public bool Update(WorkMethodology item)
        {
            if (item == null)
            {
                throw new InvalidOperationException("The item can't be null");
            }

            return(_dataAccess.Update(item));
        }
예제 #3
0
 public void CanGetByCode()
 {
     if (_repository.Create(workMethodologyTest))
     {
         WorkMethodology workMethodologyFinded = _repository.GetByCode(workMethodologyTest.Code);
         Assert.AreEqual(workMethodologyTest, workMethodologyFinded);
     }
     else
     {
         Assert.Fail("Can't create the sex object for test");
     }
 }
예제 #4
0
        public WorkMethodologyRepositoryTests()
        {
            using (var scope = Container.MainContainer.BeginLifetimeScope())
            {
                _repository = scope.Resolve <IWorkMethodologyRepository>();
            }

            workMethodologyTest = new WorkMethodology
            {
                Code = "SCR",
                Name = "Scrum"
            };
        }
 public ServiceError Validate(WorkMethodology data)
 {
     throw new NotImplementedException();
 }