This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DependencyRelationship d = new DependencyRelationship(supplier, client, "", a, UtilResources.getRandonUUID()); | |
DependencyRelationship dsame = new DependencyRelationship(supplier, client, "", a, UtilResources.getRandonUUID()); | |
assertTrue(d.equals(dsame)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- !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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |