Example #1
0
        public void Map_ComponentInterfaceVO()
        {
            var from = new ComponentInterfaceVO
            {
                Id   = Guid.NewGuid(),
                Name = NamesGenerator.ComponentInterfaceName()
            };
            var to = Mapper.Map <ComponentInterfaceModel>(from);

            AssertAllPropertiesSet(from, to);
            AssertLinksSet(to);
        }
Example #2
0
 public async Task CreateComponentInterface(ComponentInterfaceVO newInterface)
 {
     await _unitOfWork.Execute(() =>
     {
         var instance = new ComponentInterface(newInterface.Name);
         _repository.Save(instance);
     }, ex =>
     {
         throw new BusinessLogicException(
             string.Format(InterfaceWithNameAlreadyExistsMsg, newInterface.Name), ex);
     });
 }
 public Task CreateComponentInterface(ComponentInterfaceVO newInterface)
 {
     Argument.NotNull(newInterface);
     Contract.Ensures(Contract.Result <Task>() != null);
     return(null);
 }