Skip to content

Commit 6a299d7

Browse files
authored
chore: update test/spec association numbers, badge (#156)
* chore: update test/spec association numbers Signed-off-by: Todd Baert <[email protected]> * chore: update spec tag Signed-off-by: Todd Baert <[email protected]> Signed-off-by: Todd Baert <[email protected]>
1 parent 2766161 commit 6a299d7

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.openfeature/sdk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.openfeature/sdk)
44
[![javadoc](https://javadoc.io/badge2/dev.openfeature/sdk/javadoc.svg)](https://javadoc.io/doc/dev.openfeature/sdk)
55
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
6-
[![Specification](https://img.shields.io/static/v1?label=Specification&message=v0.5.0&color=yellow)](https://github.com/open-feature/spec/tree/v0.5.0)
6+
[![v0.5.1](https://img.shields.io/static/v1?label=Specification&message=v0.5.1&color=yellow)](https://github.com/open-feature/spec/tree/v0.5.1)
77
[![Known Vulnerabilities](https://snyk.io/test/github/open-feature/java-sdk/badge.svg)](https://snyk.io/test/github/open-feature/java-sdk)
88
[![on-merge](https://github.com/open-feature/java-sdk/actions/workflows/merge.yml/badge.svg)](https://github.com/open-feature/java-sdk/actions/workflows/merge.yml)
99
[![codecov](https://codecov.io/gh/open-feature/java-sdk/branch/main/graph/badge.svg?token=XMS9L7PBY1)](https://codecov.io/gh/open-feature/java-sdk)

src/test/java/dev/openfeature/sdk/ProviderSpecTest.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
public class ProviderSpecTest {
99
NoOpProvider p = new NoOpProvider();
1010

11-
@Specification(number="2.1", text="The provider interface MUST define a metadata member or accessor, containing a name field or accessor of type string, which identifies the provider implementation.")
11+
@Specification(number="2.1.1", text="The provider interface MUST define a metadata member or accessor, containing a name field or accessor of type string, which identifies the provider implementation.")
1212
@Test void name_accessor() {
1313
assertNotNull(p.getName());
1414
}
1515

16-
@Specification(number="2.3.1", text="The feature provider interface MUST define methods for typed " +
16+
@Specification(number="2.2.2.1", text="The feature provider interface MUST define methods for typed " +
1717
"flag resolution, including boolean, numeric, string, and structure.")
18-
@Specification(number="2.4", text="In cases of normal execution, the provider MUST populate the " +
18+
@Specification(number="2.2.3", text="In cases of normal execution, the provider MUST populate the " +
1919
"flag resolution structure's value field with the resolved flag value.")
20-
@Specification(number="2.2", text="The feature provider interface MUST define methods to resolve " +
20+
@Specification(number="2.2.1", text="The feature provider interface MUST define methods to resolve " +
2121
"flag values, with parameters flag key (string, required), default value " +
2222
"(boolean | number | string | structure, required) and evaluation context (optional), " +
2323
"which returns a flag resolution structure.")
24-
@Specification(number="2.9.1", text="The flag resolution structure SHOULD accept a generic " +
24+
@Specification(number="2.2.8.1", text="The flag resolution structure SHOULD accept a generic " +
2525
"argument (or use an equivalent language feature) which indicates the type of the wrapped value field.")
2626
@Test void flag_value_set() {
2727
ProviderEvaluation<Integer> int_result = p.getIntegerEvaluation("key", 4, new MutableContext());
@@ -41,25 +41,25 @@ public class ProviderSpecTest {
4141

4242
}
4343

44-
@Specification(number="2.6", text="The `provider` SHOULD populate the `flag resolution` structure's `reason` field with `\"DEFAULT\",` `\"TARGETING_MATCH\"`, `\"SPLIT\"`, `\"DISABLED\"`, `\"UNKNOWN\"`, `\"ERROR\"` or some other string indicating the semantic reason for the returned flag value.")
44+
@Specification(number="2.2.5", text="The `provider` SHOULD populate the `flag resolution` structure's `reason` field with `\"DEFAULT\",` `\"TARGETING_MATCH\"`, `\"SPLIT\"`, `\"DISABLED\"`, `\"UNKNOWN\"`, `\"ERROR\"` or some other string indicating the semantic reason for the returned flag value.")
4545
@Test void has_reason() {
4646
ProviderEvaluation<Boolean> result = p.getBooleanEvaluation("key", false, new MutableContext());
4747
assertEquals(Reason.DEFAULT.toString(), result.getReason());
4848
}
4949

50-
@Specification(number="2.7", text="In cases of normal execution, the provider MUST NOT populate " +
50+
@Specification(number="2.2.6", text="In cases of normal execution, the provider MUST NOT populate " +
5151
"the flag resolution structure's error code field, or otherwise must populate it with a null or falsy value.")
5252
@Test void no_error_code_by_default() {
5353
ProviderEvaluation<Boolean> result = p.getBooleanEvaluation("key", false, new MutableContext());
5454
assertNull(result.getErrorCode());
5555
}
5656

57-
@Specification(number="2.8", text="In cases of abnormal execution, the `provider` **MUST** indicate an error using the idioms of the implementation language, with an associated `error code` and optional associated `error message`.")
58-
@Specification(number="2.11", text="In cases of normal execution, the `provider` **MUST NOT** populate the `flag resolution` structure's `error message` field, or otherwise must populate it with a null or falsy value.")
59-
@Specification(number="2.12", text="In cases of abnormal execution, the `evaluation details` structure's `error message` field **MAY** contain a string containing additional detail about the nature of the error.")
57+
@Specification(number="2.2.7", text="In cases of abnormal execution, the `provider` **MUST** indicate an error using the idioms of the implementation language, with an associated `error code` and optional associated `error message`.")
58+
@Specification(number="2.3.2", text="In cases of normal execution, the `provider` **MUST NOT** populate the `flag resolution` structure's `error message` field, or otherwise must populate it with a null or falsy value.")
59+
@Specification(number="2.3.3", text="In cases of abnormal execution, the `evaluation details` structure's `error message` field **MAY** contain a string containing additional detail about the nature of the error.")
6060
@Test void up_to_provider_implementation() {}
6161

62-
@Specification(number="2.5", text="In cases of normal execution, the provider SHOULD populate the " +
62+
@Specification(number="2.2.4", text="In cases of normal execution, the provider SHOULD populate the " +
6363
"flag resolution structure's variant field with a string identifier corresponding to the returned flag value.")
6464
@Test void variant_set() {
6565
ProviderEvaluation<Integer> int_result = p.getIntegerEvaluation("key", 4, new MutableContext());
@@ -75,7 +75,7 @@ public class ProviderSpecTest {
7575
assertNotNull(boolean_result.getReason());
7676
}
7777

78-
@Specification(number="2.10", text="The provider interface MUST define a provider hook mechanism which can be optionally implemented in order to add hook instances to the evaluation life-cycle.")
78+
@Specification(number="2.3.1", text="The provider interface MUST define a provider hook mechanism which can be optionally implemented in order to add hook instances to the evaluation life-cycle.")
7979
@Specification(number="4.4.1", text="The API, Client, Provider, and invocation MUST have a method for registering hooks.")
8080
@Test void provider_hooks() {
8181
assertEquals(0, p.getProviderHooks().size());

0 commit comments

Comments
 (0)