Skip to content

Instantly share code, notes, and snippets.

View edipofederle's full-sized avatar
🏠
Working from home

Édipo Féderle edipofederle

🏠
Working from home
View GitHub Profile
public Object execute(Object object) throws JMException {
Solution solution = (Solution) object;
Double probability = (Double) getParameter("probability");
Architecture clone = null;
try {
clone = ((Architecture) solution.getDecisionVariables()[0]).deepClone();
} catch (CloneNotSupportedException e1) {
e1.printStackTrace();
}
DependencyRelationship d = new DependencyRelationship(supplier, client, "", a, UtilResources.getRandonUUID());
DependencyRelationship dsame = new DependencyRelationship(supplier, client, "", a, UtilResources.getRandonUUID());
assertTrue(d.equals(dsame));
public class Conf{
//Retorna um path configurado num arquivo
public static String path(){
return "path/to/hell";
}
}
public class Main{
public void doSomething(){
sobreescrever retorno de path neste método;
private void moveAttributeAllComponents(Architecture arch, Package sourceComp, Package targetComp, Class sourceClass, List<Attribute> AttributesClass, Class newClass) throws JMException {
Attribute targetAttribute = randomObject (AttributesClass);
sourceClass.moveAttributeToClass(targetAttribute, newClass);
for (Concern con: targetAttribute.getOwnConcerns()){
try {
newClass.addConcern(con.getName());
} catch (ConcernNotFoundException e) {
e.printStackTrace();
}
}
@Test
public void testeGiovani() throws Exception{
Architecture a = givenAArchitecture("teste");
Class foo = a.createClass("Foo", false);
Interface bar = a.createInterface("bar");
RealizationRelationship r = new RealizationRelationship(foo, bar, "teste", UtilResources.getRandonUUID());
a.addRelationship(r);
--- !DirTarget
pathToTemplateModelsDirectory: filesTemplates/ #deve ser algum diretorio contendo os tres arquivos de template(di, uml e notation). Este arquivos Estão na psta filesTemplates na raíz do projeto
directoryToSaveModels: manipulation/ #qualquer diretório (é temporario)
directoryToExportModels: /Users/elf/mestrado/sourcesMestrado/arquitetura/output/ #onde você deseja ter as saídas
pathToProfile: perfis/smarty.profile.uml #local do profile
pathToProfileConcern: perfis/concerns.profile.uml #local do profile
pathToProfileRelationships: perfis/relationships.profile.uml #local do profile
pathToProfilePatterns: perfis/patterns.profile.uml #local do profile
@edipofederle
edipofederle / spec_helper.rb
Created November 5, 2013 15:50
hide warnings: CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug. 2013-11-05 13:38:42.643 phantomjs[74650:507] CoreText performance note: Client called CTFontCreateWithName() using name "Lucida Grande" and got font with PostScript name "LucidaGrande". For best performance, only use PostScript names when calling t…
# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'capybara/rails'
include Capybara::DSL
require 'capybara/poltergeist'
require 'factory_girl_rails'
require 'tougg_macros'
# Requires supporting ruby files with custom matchers and macros, etc,
//Dúvidas no comentários
private void removeInterfaceRelationships (Interface interface_, Architecture offspring){
List<Relationship> relationships = new ArrayList<Relationship> (interface_.getRelationships());
if(!relationships.isEmpty()){
Iterator<Relationship> iteratorRelationships = relationships.iterator();
while (iteratorRelationships.hasNext()){
Relationship relationship= iteratorRelationships.next();
if (relationship instanceof AbstractionRelationship){
AbstractionRelationship abstraction = (AbstractionRelationship) relationship;
@Test
public void classShouldBeEqualsWhenNameAndNamespaceAreEquals(){
arquitetura.representation.Class klass = mock(arquitetura.representation.Class.class);
arquitetura.representation.Class klass2 = mock(arquitetura.representation.Class.class);
when(klass.getName()).thenReturn("Foo");
when(klass.getNamespace()).thenReturn("ufpr.bar");
when(klass2.getName()).thenReturn("Foo");
when(klass2.getNamespace()).thenReturn("ufpr.bar");
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo apt-get install libqt4-dev
gem install capybara-webkit -v '0.7.2'
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ git clone https://github.com/sstephenson/ruby-build.git