示例#1
0
        public void GetAllHeadOfficeNullTest()
        {
            var _repository = Substitute.For <IHeadOfficeRepository>();

            _repository.GetAll().Returns(new Collection <HeadOffice>());
            HeadOfficeDomainService _service = new HeadOfficeDomainService(_repository);
            string message = _service.GetAllMerk().Messages.FirstOrDefault().Value;

            Assert.AreEqual(message, "Tidak Ada Merk Yang Terdaftar");
        }
 public void GetAllHeadOfficeNullTest()
 {
     var _repository = Substitute.For<IHeadOfficeRepository>();
     _repository.GetAll().Returns(new Collection<HeadOffice>());
     HeadOfficeDomainService _service = new HeadOfficeDomainService(_repository);
     string message = _service.GetAllMerk().Messages.FirstOrDefault().Value;
     Assert.AreEqual(message, "Tidak Ada Merk Yang Terdaftar");
 }
示例#3
0
        public void GetAllHeadOfficeTest()
        {
            Collection <HeadOfficeDomain> headOffices = service.GetAllMerk().HeadOfficeDomains;

            Assert.IsNotNull(headOffices);
        }