Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean code #11798

Merged
merged 4 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.springframework.data.mongodb.core.MongoTemplate;
import tech.jhipster.lite.shared.generation.domain.ExcludeFromGeneratedCodeCoverage;

@ChangeUnit(id = "create-applied-modules-collection", order = "002", author = "cdamon")
@ChangeUnit(id = "create-applied-modules-collection", order = "002", author = "jhipster")
@ExcludeFromGeneratedCodeCoverage(reason = "Rollback not called in a normal lifecycle and an implementation detail")
public class AppliedModulesChangeUnit {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The changelog folder for cassandra/cql files is similar to Liquibase (for SQL databases), but with a minimal tooling.
The changelog folder for cassandra/cql files is similar to Liquibase (for SQL databases), but with minimal tooling.

- The script name should follow the pattern yyyyMMddHHmmss\_{script-name}.cql
- eg: 20150805124838_added_table_BankAccount.cql
Expand All @@ -12,5 +12,5 @@ Changelog scripts MUST tell explicitly which keyspace is used:
- by using `USE myKeyspace;` directive at the beginning of a script
- or by prepending each table with the keyspace it belongs to: `CREATE TABLE IF NOT EXISTS myKeyspace.myTable`

Second approach is recommended: it allows not switching keyspace at runtime if there are many of them.
The second approach is recommended: it allows not switching keyspace at runtime if there are many of them.
See [warn-if-set-keyspace section](https://docs.datastax.com/en/developer/java-driver/latest/manual/core/configuration/reference/) for more info.
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ void shouldNotBuildWithInvalidPattern() {

@Test
void shouldNotMatchNotMatchingPattern() {
assertThat(new RegexReplacer(always(), "pouet").notMatchIn("toto")).isTrue();
assertThat(new RegexReplacer(always(), "hello").notMatchIn("toto")).isTrue();
}

@Test
void shouldMatchMatchingPattern() {
assertThat(new RegexReplacer(always(), "pouet").notMatchIn("pouet")).isFalse();
assertThat(new RegexReplacer(always(), "hello").notMatchIn("hello")).isFalse();
}

@Test
void shouldGetPatternAsSearchMatcher() {
assertThat(new RegexReplacer(always(), "pouet").searchMatcher()).isEqualTo("pouet");
assertThat(new RegexReplacer(always(), "hello").searchMatcher()).isEqualTo("hello");
}
}
8 changes: 4 additions & 4 deletions src/test/webapp/unit/loader/primary/Loader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ describe('Loader', () => {
});

it('should build loaded value', () => {
const loader = Loader.loaded('pouet');
const loader = Loader.loaded('hello');

expect(loader.isLoading()).toBe(false);
expect(loader.value()).toBe('pouet');
expect(loader.value()).toBe('hello');
});

it('should load value', () => {
const loader = Loader.loading();

loader.loaded('pouet');
loader.loaded('hello');

expect(loader.isLoading()).toBe(false);
expect(loader.value()).toBe('pouet');
expect(loader.value()).toBe('hello');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -767,11 +767,11 @@ describe('Landscape', () => {
await flushPromises();

await clickModule('init', wrapper);
await wrapper.find(wrappedElement('parameter-baseName-field')).setValue('pouet');
await wrapper.find(wrappedElement('parameter-baseName-field')).setValue('hello');
await updatePath(wrapper);

const baseNameField = wrapper.find(wrappedElement('parameter-baseName-field')).element as HTMLInputElement;
expect(baseNameField.value).toBe('pouet');
expect(baseNameField.value).toBe('hello');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ describe('Modules', () => {
const modules = repositoryWithModules();
const wrapper = await filledModuleForm(modules);

wrapper.find(wrappedElement('modules-filter-field')).setValue('pouet');
wrapper.find(wrappedElement('modules-filter-field')).setValue('hello');
await flushForm(wrapper);

expect(wrapper.find(wrappedElement('module-banner-application-button')).exists()).toBe(false);
Expand Down
Loading