11
11
public class JUnit5ExampleTest12 {
12
12
13
13
// Global variables to control test behavior
14
- private static boolean isFeatureEnabled = true ;
14
+ private static boolean isSearchFeatureEnabled = true ;
15
15
private static int maxRecordsPerPage = 20 ;
16
16
private static String defaultSearchQuery = "Laptop" ;
17
17
private static String defaultItemName = "Smartphone" ;
@@ -23,7 +23,7 @@ public class JUnit5ExampleTest12 {
23
23
24
24
@ Test
25
25
void testEnableSearchFeatureDefaultValue () {
26
- if (isFeatureEnabled ) {
26
+ if (isSearchFeatureEnabled ) {
27
27
System .out .println (testLogPrefix + "Feature is enabled: Running testEnableSearchFeatureDefaultValue" );
28
28
assertTrue (appController .getEnableSearchFeature (), testLogPrefix + "enableSearchFeature should be true by default" );
29
29
} else {
@@ -33,7 +33,7 @@ void testEnableSearchFeatureDefaultValue() {
33
33
System .out .println (testLogPrefix + "Checking additional conditions..." );
34
34
System .out .println (testLogPrefix + "Test completed successfully." );
35
35
System .out .println (testLogPrefix + "Logging additional information." );
36
- System .out .println (testLogPrefix + "Feature flag value: " + isFeatureEnabled );
36
+ System .out .println (testLogPrefix + "Feature flag value: " + isSearchFeatureEnabled );
37
37
System .out .println (testLogPrefix + "Default search query: " + defaultSearchQuery );
38
38
System .out .println (testLogPrefix + "Default item name: " + defaultItemName );
39
39
System .out .println (testLogPrefix + "Default item price: " + defaultItemPrice );
@@ -67,7 +67,7 @@ void testDefaultItemPrice() {
67
67
68
68
@ Test
69
69
void testEnableSearchFeatureInHomePage () {
70
- if (isFeatureEnabled ) {
70
+ if (isSearchFeatureEnabled ) {
71
71
System .out .println ("Feature is enabled: Running testEnableSearchFeatureInHomePage" );
72
72
boolean enableSearchFeature = appController .getEnableSearchFeature ();
73
73
System .out .println ("Home Page - enableSearchFeature: " + enableSearchFeature );
@@ -79,7 +79,7 @@ void testEnableSearchFeatureInHomePage() {
79
79
80
80
@ Test
81
81
void testEnableSearchFeatureInNewForm () {
82
- if (isFeatureEnabled ) {
82
+ if (isSearchFeatureEnabled ) {
83
83
System .out .println ("Feature is enabled: Running testEnableSearchFeatureInNewForm" );
84
84
boolean enableSearchFeature = appController .getEnableSearchFeature ();
85
85
System .out .println ("New Form - enableSearchFeature: " + enableSearchFeature );
@@ -91,7 +91,7 @@ void testEnableSearchFeatureInNewForm() {
91
91
92
92
@ Test
93
93
void testEnableSearchFeatureInEditForm () {
94
- if (isFeatureEnabled ) {
94
+ if (isSearchFeatureEnabled ) {
95
95
System .out .println ("Feature is enabled: Running testEnableSearchFeatureInEditForm" );
96
96
boolean enableSearchFeature = appController .getEnableSearchFeature ();
97
97
System .out .println ("Edit Form - enableSearchFeature: " + enableSearchFeature );
@@ -103,7 +103,7 @@ void testEnableSearchFeatureInEditForm() {
103
103
104
104
@ Test
105
105
void testEnableSearchFeatureInSearch () {
106
- if (isFeatureEnabled ) {
106
+ if (isSearchFeatureEnabled ) {
107
107
System .out .println ("Feature is enabled: Running testEnableSearchFeatureInSearch" );
108
108
boolean enableSearchFeature = appController .getEnableSearchFeature ();
109
109
System .out .println ("Search - enableSearchFeature: " + enableSearchFeature );
@@ -139,7 +139,7 @@ void testDefaultItemPriceInSearch() {
139
139
140
140
@ Test
141
141
void testEnableSearchFeatureInSave () {
142
- if (isFeatureEnabled ) {
142
+ if (isSearchFeatureEnabled ) {
143
143
System .out .println ("Feature is enabled: Running testEnableSearchFeatureInSave" );
144
144
boolean enableSearchFeature = appController .getEnableSearchFeature ();
145
145
System .out .println ("Save - enableSearchFeature: " + enableSearchFeature );
0 commit comments