Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 67f91573

Přidáno uživatelem Martin Matas před téměř 6 roky(ů)

Extended test to cover added necessary fields

Zobrazit rozdíly:

sources/imiger-dot-converter/src/test/java/cz/zcu/kiv/imiger/plugin/dot/GraphFactoryTest.java
59 59
	private static final String EDGE_ARCHETYPE = "Edge";
60 60
	private static final String VERTEX_ARCHETYPE = "Vertex";
61 61

  
62
	private static final boolean EMPTY_UNUSED_CLASS_ATTR = true;
63

  
62 64
	/**
63 65
	 * Mock object of {@link BaseDOTLoader}.
64 66
	 */
......
85 87
		assertThat(factory.vertices.size(), is(expectedVerticesSize));
86 88
		assertThat(factory.edgeArchetypes, is(not(nullValue())));
87 89
		assertThat(factory.vertexArchetypes, is(not(nullValue())));
90
		assertThat(factory.possibleEnumValues, is(not(nullValue())));
91
		assertThat(factory.groups, is(not(nullValue())));
92
		assertThat(factory.sideBar, is(not(nullValue())));
93
		assertThat(factory.highlightedEdge, is(not(nullValue())));
94
		assertThat(factory.highlightedVertex, is(not(nullValue())));
88 95
		// test attribute type
89 96
		assertThat(factory.attributeTypes.get(ATTR_TYPE_ID).getName(), is(equalTo(ATTR_TYPE_NAME)));
90 97
		assertThat(factory.attributeTypes.get(ATTR_TYPE_ID).getText(), is(equalTo(ATTR_TYPE_TEXT)));
......
98 105
		// test archetypes
99 106
		assertThat(factory.edgeArchetypes.get(0).getName(), is(equalTo(EDGE_ARCHETYPE)));
100 107
		assertThat(factory.vertexArchetypes.get(0).getName(), is(equalTo(VERTEX_ARCHETYPE)));
108
		// the rest of required but unused attributes
109
		assertThat(factory.possibleEnumValues.isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
110
		assertThat(factory.groups.isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
111
		assertThat(factory.sideBar.isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
112
		assertThat(factory.highlightedEdge.isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
113
		assertThat(factory.highlightedVertex.isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
101 114
	}
102 115

  
103 116
	/**
......
120 133
		assertThat(factory.vertices.size(), is(expectedVerticesSize));
121 134
		assertThat(factory.edgeArchetypes, is(not(nullValue())));
122 135
		assertThat(factory.vertexArchetypes, is(not(nullValue())));
136
		assertThat(factory.possibleEnumValues, is(not(nullValue())));
137
		assertThat(factory.groups, is(not(nullValue())));
138
		assertThat(factory.sideBar, is(not(nullValue())));
139
		assertThat(factory.highlightedEdge, is(not(nullValue())));
140
		assertThat(factory.highlightedVertex, is(not(nullValue())));
123 141
	}
124 142

  
125 143
	/**
......
142 160
		assertThat(factory.vertices.size(), is(expectedVerticesSize));
143 161
		assertThat(factory.edgeArchetypes, is(not(nullValue())));
144 162
		assertThat(factory.vertexArchetypes, is(not(nullValue())));
163
		assertThat(factory.possibleEnumValues, is(not(nullValue())));
164
		assertThat(factory.groups, is(not(nullValue())));
165
		assertThat(factory.sideBar, is(not(nullValue())));
166
		assertThat(factory.highlightedEdge, is(not(nullValue())));
167
		assertThat(factory.highlightedVertex, is(not(nullValue())));
145 168
	}
146 169

  
147 170
	/**
......
186 209
		// test archetypes
187 210
		assertThat(graph.getEdgeArchetypes().get(0).getName(), is(equalTo(EDGE_ARCHETYPE)));
188 211
		assertThat(graph.getVertexArchetypes().get(0).getName(), is(equalTo(VERTEX_ARCHETYPE)));
212
		// the rest of required but unused attributes
213
		assertThat(graph.getPossibleEnumValues().isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
214
		assertThat(graph.getGroups().isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
215
		assertThat(graph.getSideBar().isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
216
		assertThat(graph.getHighlightedEdge().isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
217
		assertThat(graph.getHighlightedVertex().isEmpty(), is(equalTo(EMPTY_UNUSED_CLASS_ATTR)));
189 218
	}
190 219

  
191 220
	/**

Také k dispozici: Unified diff