public MerkServiceResponse GetAllMerk() { MerkServiceResponse response = new MerkServiceResponse(); Collection <Merk> merks = _merkRepository.GetAll(); if (merks.Count == 0) { response.Messages.Add(new Message("Tidak Ada Merk Yang Terdaftar")); } else { foreach (var m in merks) { CreateParameter param = new CreateParameter(m.Id, m.Code, m.Name, m.Manufacture); MerkDomain merk = MerkDomain.Create(param); MergeExtension.Merge(merk, m); response.MerkDomains.Add(merk); } } return(response); }
public void GetAllMerkTest() { merkList = _repository.GetAll(); Assert.IsNotNull(merkList, "Merk Tidak Kosong"); }