Skip to content

Commit 196919f

Browse files
zazaafrittoli
authored andcommitted
Fix #23 by making sure CD event type names are unique
1 parent fd02e04 commit 196919f

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

src/main/java/dev/cdevents/constants/CDEventConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public enum CDEventTypes {
165165
/**
166166
* Artifact published event.
167167
*/
168-
ArtifactPublishedEvent("dev.cdevents.artifact.packaged." + VERSION),
168+
ArtifactPublishedEvent("dev.cdevents.artifact.published." + VERSION),
169169
/**
170170
* Artifact created event.
171171
*/
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package dev.cdevents.constants;
2+
3+
import static org.assertj.core.api.Assertions.assertThat;
4+
5+
import org.junit.jupiter.api.Test;
6+
7+
import dev.cdevents.constants.CDEventConstants.CDEventTypes;
8+
9+
public class CDEventTypesTest {
10+
@Test
11+
void eventTypeNamesAreUnique() {
12+
assertThat(CDEventTypes.values()).extracting(CDEventTypes::getEventType).doesNotHaveDuplicates();
13+
}
14+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Copyright 2022-Present https://cdevents.dev/
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*
14+
*
15+
*/
16+
17+
package dev.cdevents.constants;

0 commit comments

Comments
 (0)