target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test void testSetDependencies() { Assertions.assertThat(this.c.getDependencies()).isEmpty(); final FileEntity dependency = new FileEntity(); dependency.setFile("s3: final Set<FileEntity> dependencies = Sets.newHashSet(dependency); this.c.setDependencies(dependencies); Assertions.assertThat(this.c.getDependencies()).is... | public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } | ClusterEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } } | ClusterEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } ClusterEntity(); } | ClusterEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } ClusterEntity(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullable fina... | ClusterEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } ClusterEntity(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullable fina... |
@Test void canSetClusterTags() { final TagEntity oneTag = new TagEntity(); oneTag.setTag("one"); final TagEntity twoTag = new TagEntity(); twoTag.setTag("tow"); final TagEntity preTag = new TagEntity(); preTag.setTag("Pre"); final Set<TagEntity> tags = Sets.newHashSet(oneTag, twoTag, preTag); this.c.setTags(tags); Asse... | public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } | ClusterEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } } | ClusterEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } ClusterEntity(); } | ClusterEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } ClusterEntity(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullable final Set<FileEntity> dependencies); void setTags(@Nu... | ClusterEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } ClusterEntity(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullable final Set<FileEntity> dependencies); void setTags(@Nu... |
@Test void testSetConfigs() { final Set<FileEntity> configs = Sets.newHashSet(new FileEntity("s3: this.a.setConfigs(configs); Assertions.assertThat(this.a.getConfigs()).isEqualTo(configs); this.a.setConfigs(null); Assertions.assertThat(this.a.getConfigs()).isEmpty(); } | public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } | ApplicationEntity extends BaseEntity { public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } } | ApplicationEntity extends BaseEntity { public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } ApplicationEntity(); } | ApplicationEntity extends BaseEntity { public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } ApplicationEntity(); Optional<String> getType(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullabl... | ApplicationEntity extends BaseEntity { public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } ApplicationEntity(); Optional<String> getType(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullabl... |
@Test void testSetDependencies() { final Set<FileEntity> dependencies = Sets.newHashSet(new FileEntity("s3: this.a.setDependencies(dependencies); Assertions.assertThat(this.a.getDependencies()).isEqualTo(dependencies); this.a.setDependencies(null); Assertions.assertThat(this.a.getDependencies()).isEmpty(); } | public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } | ApplicationEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } } | ApplicationEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } ApplicationEntity(); } | ApplicationEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } ApplicationEntity(); Optional<String> getType(); void setConfigs(@Nullable final Set<FileEntity> configs);... | ApplicationEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } ApplicationEntity(); Optional<String> getType(); void setConfigs(@Nullable final Set<FileEntity> configs);... |
@Test void testSetTags() { final TagEntity tag1 = new TagEntity("tag1"); final TagEntity tag2 = new TagEntity("tag2"); final Set<TagEntity> tags = Sets.newHashSet(tag1, tag2); this.a.setTags(tags); Assertions.assertThat(this.a.getTags()).isEqualTo(tags); this.a.setTags(null); Assertions.assertThat(this.a.getTags()).isE... | public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } | ApplicationEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } } | ApplicationEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } ApplicationEntity(); } | ApplicationEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } ApplicationEntity(); Optional<String> getType(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullable final Set<FileEnt... | ApplicationEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } ApplicationEntity(); Optional<String> getType(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullable final Set<FileEnt... |
@Test void testSetCommands() { final Set<CommandEntity> commandEntities = Sets.newHashSet(new CommandEntity()); this.a.setCommands(commandEntities); Assertions.assertThat(this.a.getCommands()).isEqualTo(commandEntities); this.a.setCommands(null); Assertions.assertThat(this.a.getCommands()).isEmpty(); } | void setCommands(@Nullable final Set<CommandEntity> commands) { this.commands.clear(); if (commands != null) { this.commands.addAll(commands); } } | ApplicationEntity extends BaseEntity { void setCommands(@Nullable final Set<CommandEntity> commands) { this.commands.clear(); if (commands != null) { this.commands.addAll(commands); } } } | ApplicationEntity extends BaseEntity { void setCommands(@Nullable final Set<CommandEntity> commands) { this.commands.clear(); if (commands != null) { this.commands.addAll(commands); } } ApplicationEntity(); } | ApplicationEntity extends BaseEntity { void setCommands(@Nullable final Set<CommandEntity> commands) { this.commands.clear(); if (commands != null) { this.commands.addAll(commands); } } ApplicationEntity(); Optional<String> getType(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nulla... | ApplicationEntity extends BaseEntity { void setCommands(@Nullable final Set<CommandEntity> commands) { this.commands.clear(); if (commands != null) { this.commands.addAll(commands); } } ApplicationEntity(); Optional<String> getType(); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nulla... |
@Test void canSetTags() { final CriterionEntity entity = new CriterionEntity(); Assertions.assertThat(entity.getTags()).isEmpty(); entity.setTags(null); Assertions.assertThat(entity.getTags()).isEmpty(); final Set<TagEntity> tags = Sets.newHashSet(); entity.setTags(tags); Assertions.assertThat(entity.getTags()).isEmpty... | public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } | CriterionEntity extends IdEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } } | CriterionEntity extends IdEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } CriterionEntity(
@Nullable final String uniqueId,
@Nullable final String name,
@Nullable final String version,
@Nullable final ... | CriterionEntity extends IdEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } CriterionEntity(
@Nullable final String uniqueId,
@Nullable final String name,
@Nullable final String version,
@Nullable final ... | CriterionEntity extends IdEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } CriterionEntity(
@Nullable final String uniqueId,
@Nullable final String name,
@Nullable final String version,
@Nullable final ... |
@Test void testEqualsAndHashCode() { final Set<TagEntity> tags = Sets.newHashSet( new TagEntity(UUID.randomUUID().toString()), new TagEntity(UUID.randomUUID().toString()) ); final CriterionEntity one = new CriterionEntity(null, null, null, null, tags); final CriterionEntity two = new CriterionEntity(null, null, null, n... | @Override public int hashCode() { return super.hashCode(); } | CriterionEntity extends IdEntity { @Override public int hashCode() { return super.hashCode(); } } | CriterionEntity extends IdEntity { @Override public int hashCode() { return super.hashCode(); } CriterionEntity(
@Nullable final String uniqueId,
@Nullable final String name,
@Nullable final String version,
@Nullable final String status,
@Nullable final Set<TagEntity> tags
);... | CriterionEntity extends IdEntity { @Override public int hashCode() { return super.hashCode(); } CriterionEntity(
@Nullable final String uniqueId,
@Nullable final String name,
@Nullable final String version,
@Nullable final String status,
@Nullable final Set<TagEntity> tags
);... | CriterionEntity extends IdEntity { @Override public int hashCode() { return super.hashCode(); } CriterionEntity(
@Nullable final String uniqueId,
@Nullable final String name,
@Nullable final String version,
@Nullable final String status,
@Nullable final Set<TagEntity> tags
);... |
@Test void testValidateEmptyExecutable() { this.c.setExecutable(Lists.newArrayList()); Assertions .assertThatExceptionOfType(ConstraintViolationException.class) .isThrownBy(() -> this.validate(this.c)); } | public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nu... | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nu... |
@Test void canGetDirectoryWithParent() { this.setupWithParent(); final DefaultDirectoryWriter.Directory dir = this.writer.getDirectory(this.directory, REQUEST_URL_WITH_PARENT, true); Assertions.assertThat(dir.getParent()).isNotNull(); Assertions.assertThat(dir.getParent().getName()).isEqualTo(PARENT_NAME); Assertions.a... | protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlank(requestUrl)) { throw new IllegalArgumentException(... | DefaultDirectoryWriter implements DirectoryWriter { protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlan... | DefaultDirectoryWriter implements DirectoryWriter { protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlan... | DefaultDirectoryWriter implements DirectoryWriter { protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlan... | DefaultDirectoryWriter implements DirectoryWriter { protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlan... |
@Test void testValidateBlankExecutable() { this.c.setExecutable(Lists.newArrayList(" ")); Assertions .assertThatExceptionOfType(ConstraintViolationException.class) .isThrownBy(() -> this.validate(this.c)); } | public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nu... | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nu... |
@Test void testValidateExecutableArgumentTooLong() { this.c.setExecutable(Lists.newArrayList(StringUtils.leftPad("", 1025, 'e'))); Assertions .assertThatExceptionOfType(ConstraintViolationException.class) .isThrownBy(() -> this.validate(this.c)); } | public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nu... | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nu... |
@Test void testSetExecutable() { this.c.setExecutable(EXECUTABLE); Assertions.assertThat(this.c.getExecutable()).isEqualTo(EXECUTABLE); } | public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); } | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nu... | CommandEntity extends BaseEntity { public void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable) { this.executable.clear(); this.executable.addAll(executable); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nu... |
@Test void testSetMemory() { Assertions.assertThat(this.c.getMemory()).isPresent().contains(MEMORY); final int newMemory = MEMORY + 1; this.c.setMemory(newMemory); Assertions.assertThat(this.c.getMemory()).isPresent().contains(newMemory); } | public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); } | CommandEntity extends BaseEntity { public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); } } | CommandEntity extends BaseEntity { public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); } CommandEntity(); } | CommandEntity extends BaseEntity { public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullable final Se... | CommandEntity extends BaseEntity { public Optional<Integer> getMemory() { return Optional.ofNullable(this.memory); } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nullable final Set<FileEntity> configs); void setDependencies(@Nullable final Se... |
@Test void testSetConfigs() { Assertions.assertThat(this.c.getConfigs()).isEmpty(); final Set<FileEntity> configs = Sets.newHashSet(new FileEntity("s3: this.c.setConfigs(configs); Assertions.assertThat(this.c.getConfigs()).isEqualTo(configs); this.c.setConfigs(null); Assertions.assertThat(this.c.getConfigs()).isEmpty()... | public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } | CommandEntity extends BaseEntity { public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } } | CommandEntity extends BaseEntity { public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } CommandEntity(); } | CommandEntity extends BaseEntity { public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nullable final Se... | CommandEntity extends BaseEntity { public void setConfigs(@Nullable final Set<FileEntity> configs) { this.configs.clear(); if (configs != null) { this.configs.addAll(configs); } } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nullable final Se... |
@Test void testSetDependencies() { Assertions.assertThat(this.c.getDependencies()).isEmpty(); final Set<FileEntity> dependencies = Sets.newHashSet(new FileEntity("dep1")); this.c.setDependencies(dependencies); Assertions.assertThat(this.c.getDependencies()).isEqualTo(dependencies); this.c.setDependencies(null); Asserti... | public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } | CommandEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } } | CommandEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } CommandEntity(); } | CommandEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void... | CommandEntity extends BaseEntity { public void setDependencies(@Nullable final Set<FileEntity> dependencies) { this.dependencies.clear(); if (dependencies != null) { this.dependencies.addAll(dependencies); } } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void... |
@Test void testSetTags() { Assertions.assertThat(this.c.getTags()).isEmpty(); final TagEntity one = new TagEntity("tag1"); final TagEntity two = new TagEntity("tag2"); final Set<TagEntity> tags = Sets.newHashSet(one, two); this.c.setTags(tags); Assertions.assertThat(this.c.getTags()).isEqualTo(tags); this.c.setTags(nul... | public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } | CommandEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } } | CommandEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } CommandEntity(); } | CommandEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nullable final Set<FileEntity> confi... | CommandEntity extends BaseEntity { public void setTags(@Nullable final Set<TagEntity> tags) { this.tags.clear(); if (tags != null) { this.tags.addAll(tags); } } CommandEntity(); void setExecutable(@NotEmpty final List<@NotBlank @Size(max = 1024) String> executable); void setConfigs(@Nullable final Set<FileEntity> confi... |
@Test void testSetApplications() throws GenieCheckedException { Assertions.assertThat(this.c.getApplications()).isEmpty(); final ApplicationEntity one = new ApplicationEntity(); one.setUniqueId("one"); final ApplicationEntity two = new ApplicationEntity(); two.setUniqueId("two"); final List<ApplicationEntity> applicati... | public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedException("List of applications to set c... | CommandEntity extends BaseEntity { public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedExcep... | CommandEntity extends BaseEntity { public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedExcep... | CommandEntity extends BaseEntity { public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedExcep... | CommandEntity extends BaseEntity { public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedExcep... |
@Test void cantSetApplicationsIfDuplicates() { final ApplicationEntity one = Mockito.mock(ApplicationEntity.class); Mockito.when(one.getUniqueId()).thenReturn(UUID.randomUUID().toString()); final ApplicationEntity two = Mockito.mock(ApplicationEntity.class); Mockito.when(two.getUniqueId()).thenReturn(UUID.randomUUID().... | public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedException("List of applications to set c... | CommandEntity extends BaseEntity { public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedExcep... | CommandEntity extends BaseEntity { public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedExcep... | CommandEntity extends BaseEntity { public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedExcep... | CommandEntity extends BaseEntity { public void setApplications( @Nullable final List<ApplicationEntity> applications ) throws PreconditionFailedException { if (applications != null && applications.stream().map(ApplicationEntity::getUniqueId).distinct().count() != applications.size()) { throw new PreconditionFailedExcep... |
@Test void canAddApplication() throws PreconditionFailedException { final String id = UUID.randomUUID().toString(); final ApplicationEntity app = new ApplicationEntity(); app.setUniqueId(id); this.c.addApplication(app); Assertions.assertThat(this.c.getApplications()).contains(app); Assertions.assertThat(app.getCommands... | public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.applications.add(application); applica... | CommandEntity extends BaseEntity { public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.app... | CommandEntity extends BaseEntity { public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.app... | CommandEntity extends BaseEntity { public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.app... | CommandEntity extends BaseEntity { public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.app... |
@Test void canGetDirectoryWithoutParent() { this.setupWithoutParent(); final DefaultDirectoryWriter.Directory dir = this.writer.getDirectory(this.directory, REQUEST_URL_BASE, false); Assertions.assertThat(dir.getParent()).isNull(); Assertions.assertThat(dir.getDirectories()).isNotNull(); Assertions.assertThat(dir.getDi... | protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlank(requestUrl)) { throw new IllegalArgumentException(... | DefaultDirectoryWriter implements DirectoryWriter { protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlan... | DefaultDirectoryWriter implements DirectoryWriter { protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlan... | DefaultDirectoryWriter implements DirectoryWriter { protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlan... | DefaultDirectoryWriter implements DirectoryWriter { protected Directory getDirectory(final File directory, final String requestUrl, final boolean includeParent) { if (!directory.isDirectory()) { throw new IllegalArgumentException("Input directory is not a valid directory. Unable to continue."); } if (StringUtils.isBlan... |
@Test void cantAddApplicationThatAlreadyIsInList() throws PreconditionFailedException { final String id = UUID.randomUUID().toString(); final ApplicationEntity app = new ApplicationEntity(); app.setUniqueId(id); this.c.addApplication(app); Assertions .assertThatExceptionOfType(PreconditionFailedException.class) .isThro... | public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.applications.add(application); applica... | CommandEntity extends BaseEntity { public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.app... | CommandEntity extends BaseEntity { public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.app... | CommandEntity extends BaseEntity { public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.app... | CommandEntity extends BaseEntity { public void addApplication(@NotNull final ApplicationEntity application) throws PreconditionFailedException { if (this.applications.contains(application)) { throw new PreconditionFailedException( "An application with id " + application.getUniqueId() + " is already added" ); } this.app... |
@Test void testChangeOwnershipOfDirectoryMethodSuccess() throws IOException { final String user = "user"; final String dir = "dir"; final ArgumentCaptor<CommandLine> argumentCaptor = ArgumentCaptor.forClass(CommandLine.class); final List<String> command = Arrays.asList("sudo", "chown", "-R", user, dir); UNIXUtils.chang... | public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } | UNIXUtils { public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } } | UNIXUtils { public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } private UN... | UNIXUtils { public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } private UN... | UNIXUtils { public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } private UN... |
@Test void testChangeOwnershipOfDirectoryMethodFailure() throws IOException { final String user = "user"; final String dir = "dir"; Mockito.when(this.executor.execute(Mockito.any(CommandLine.class))).thenThrow(new IOException()); Assertions.assertThatIOException().isThrownBy(() -> UNIXUtils.changeOwnershipOfDirectory(d... | public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } | UNIXUtils { public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } } | UNIXUtils { public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } private UN... | UNIXUtils { public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } private UN... | UNIXUtils { public static void changeOwnershipOfDirectory( final String dir, final String user, final Executor executor ) throws IOException { final CommandLine commandLine = new CommandLine(SUDO) .addArgument("chown") .addArgument("-R") .addArgument(user) .addArgument(dir); executor.execute(commandLine); } private UN... |
@Test void testCreateUserMethodSuccessAlreadyExists() throws IOException { final String user = "user"; final String group = "group"; final ArgumentCaptor<CommandLine> argumentCaptor = ArgumentCaptor.forClass(CommandLine.class); final List<String> command = Arrays.asList("id", "-u", user); UNIXUtils.createUser(user, gro... | public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already exists"); } ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... |
@Test void testCreateUserMethodSuccessDoesNotExist1() throws IOException { final String user = "user"; final String group = "group"; final CommandLine idCheckCommandLine = new CommandLine("id"); idCheckCommandLine.addArgument("-u"); idCheckCommandLine.addArgument(user); Mockito.when(this.executor.execute(Mockito.any(Co... | public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already exists"); } ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... |
@Test void testCreateUserMethodSuccessDoesNotExist2() throws IOException { final String user = "user"; final String group = "group"; Mockito.when(this.executor.execute(Mockito.any(CommandLine.class))).thenThrow(new IOException()); Assertions.assertThatIOException().isThrownBy(() -> UNIXUtils.createUser(user, group, exe... | public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already exists"); } ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... | UNIXUtils { public static synchronized void createUser( final String user, @Nullable final String group, final Executor executor ) throws IOException { final CommandLine idCheckCommandLine = new CommandLine("id") .addArgument("-u") .addArgument(user); try { executor.execute(idCheckCommandLine); log.debug("User already ... |
@Test void canConstruct() { Assertions.assertThat(this.properties.isEnabled()).isEqualTo(JobsActiveLimitProperties.DEFAULT_ENABLED); Assertions.assertThat(this.properties.getCount()).isEqualTo(JobsActiveLimitProperties.DEFAULT_COUNT); Assertions .assertThat(this.properties.getUserLimit("SomeUser")) .isEqualTo(JobsActiv... | public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; } | JobsActiveLimitProperties implements EnvironmentAware { public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; } } | JobsActiveLimitProperties implements EnvironmentAware { public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; } } | JobsActiveLimitProperties implements EnvironmentAware { public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; } int getUserLimit(final String u... | JobsActiveLimitProperties implements EnvironmentAware { public int getUserLimit(final String user) { final Environment env = this.environment.get(); if (env != null) { return env.getProperty( USER_LIMIT_OVERRIDE_PROPERTY_PREFIX + user, Integer.class, this.count ); } return this.count; } int getUserLimit(final String u... |
@Test void canGetMidnightUtc() { final Instant midnightUTC = TaskUtils.getMidnightUTC(); final ZonedDateTime cal = ZonedDateTime.ofInstant(midnightUTC, ZoneId.of("UTC")); Assertions.assertThat(cal.getNano()).isEqualTo(0); Assertions.assertThat(cal.getSecond()).isEqualTo(0); Assertions.assertThat(cal.getMinute()).isEqua... | public static Instant getMidnightUTC() { return ZonedDateTime.now(ZoneId.of("UTC")).withHour(0).withMinute(0).withSecond(0).withNano(0).toInstant(); } | TaskUtils { public static Instant getMidnightUTC() { return ZonedDateTime.now(ZoneId.of("UTC")).withHour(0).withMinute(0).withSecond(0).withNano(0).toInstant(); } } | TaskUtils { public static Instant getMidnightUTC() { return ZonedDateTime.now(ZoneId.of("UTC")).withHour(0).withMinute(0).withSecond(0).withNano(0).toInstant(); } protected TaskUtils(); } | TaskUtils { public static Instant getMidnightUTC() { return ZonedDateTime.now(ZoneId.of("UTC")).withHour(0).withMinute(0).withSecond(0).withNano(0).toInstant(); } protected TaskUtils(); static Instant getMidnightUTC(); } | TaskUtils { public static Instant getMidnightUTC() { return ZonedDateTime.now(ZoneId.of("UTC")).withHour(0).withMinute(0).withSecond(0).withNano(0).toInstant(); } protected TaskUtils(); static Instant getMidnightUTC(); } |
@Test void canGetScheduleType() { Assertions.assertThat(this.task.getScheduleType()).isEqualTo(GenieTaskScheduleType.TRIGGER); } | @Override public GenieTaskScheduleType getScheduleType() { return GenieTaskScheduleType.TRIGGER; } | DatabaseCleanupTask extends LeaderTask { @Override public GenieTaskScheduleType getScheduleType() { return GenieTaskScheduleType.TRIGGER; } } | DatabaseCleanupTask extends LeaderTask { @Override public GenieTaskScheduleType getScheduleType() { return GenieTaskScheduleType.TRIGGER; } DatabaseCleanupTask(
@NotNull final DatabaseCleanupProperties cleanupProperties,
@NotNull final Environment environment,
@NotNull final DataServices dataSer... | DatabaseCleanupTask extends LeaderTask { @Override public GenieTaskScheduleType getScheduleType() { return GenieTaskScheduleType.TRIGGER; } DatabaseCleanupTask(
@NotNull final DatabaseCleanupProperties cleanupProperties,
@NotNull final Environment environment,
@NotNull final DataServices dataSer... | DatabaseCleanupTask extends LeaderTask { @Override public GenieTaskScheduleType getScheduleType() { return GenieTaskScheduleType.TRIGGER; } DatabaseCleanupTask(
@NotNull final DatabaseCleanupProperties cleanupProperties,
@NotNull final Environment environment,
@NotNull final DataServices dataSer... |
@Test void canGetTrigger() { final String expression = "0 0 1 * * *"; this.environment.setProperty(DatabaseCleanupProperties.EXPRESSION_PROPERTY, expression); Mockito.when(this.cleanupProperties.getExpression()).thenReturn("0 0 0 * * *"); final Trigger trigger = this.task.getTrigger(); if (trigger instanceof CronTrigge... | @Override public Trigger getTrigger() { final String expression = this.environment.getProperty( DatabaseCleanupProperties.EXPRESSION_PROPERTY, String.class, this.cleanupProperties.getExpression() ); return new CronTrigger(expression, JobConstants.UTC); } | DatabaseCleanupTask extends LeaderTask { @Override public Trigger getTrigger() { final String expression = this.environment.getProperty( DatabaseCleanupProperties.EXPRESSION_PROPERTY, String.class, this.cleanupProperties.getExpression() ); return new CronTrigger(expression, JobConstants.UTC); } } | DatabaseCleanupTask extends LeaderTask { @Override public Trigger getTrigger() { final String expression = this.environment.getProperty( DatabaseCleanupProperties.EXPRESSION_PROPERTY, String.class, this.cleanupProperties.getExpression() ); return new CronTrigger(expression, JobConstants.UTC); } DatabaseCleanupTask(
... | DatabaseCleanupTask extends LeaderTask { @Override public Trigger getTrigger() { final String expression = this.environment.getProperty( DatabaseCleanupProperties.EXPRESSION_PROPERTY, String.class, this.cleanupProperties.getExpression() ); return new CronTrigger(expression, JobConstants.UTC); } DatabaseCleanupTask(
... | DatabaseCleanupTask extends LeaderTask { @Override public Trigger getTrigger() { final String expression = this.environment.getProperty( DatabaseCleanupProperties.EXPRESSION_PROPERTY, String.class, this.cleanupProperties.getExpression() ); return new CronTrigger(expression, JobConstants.UTC); } DatabaseCleanupTask(
... |
@Test void canConvertToHtml() throws Exception { this.setupWithParent(); final String html = this.writer.toHtml(this.directory, REQUEST_URL_WITH_PARENT, true); Assertions.assertThat(html).isNotNull(); final Tidy tidy = new Tidy(); final Writer stringWriter = new StringWriter(); tidy.parse(new ByteArrayInputStream(html.... | @Override public String toHtml( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws IOException { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return directoryToHTML(directory.getName(), dir); } | DefaultDirectoryWriter implements DirectoryWriter { @Override public String toHtml( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws IOException { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return directoryToHTML(directory.getName(), d... | DefaultDirectoryWriter implements DirectoryWriter { @Override public String toHtml( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws IOException { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return directoryToHTML(directory.getName(), d... | DefaultDirectoryWriter implements DirectoryWriter { @Override public String toHtml( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws IOException { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return directoryToHTML(directory.getName(), d... | DefaultDirectoryWriter implements DirectoryWriter { @Override public String toHtml( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws IOException { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return directoryToHTML(directory.getName(), d... |
@Test void canRun() { final int days = 5; final int negativeDays = -1 * days; final int pageSize = 10; Mockito.when(this.jobCleanupProperties.getRetention()).thenReturn(days).thenReturn(negativeDays); Mockito.when(this.jobCleanupProperties.getPageSize()).thenReturn(pageSize); Mockito.when(this.commandDeactivationProper... | @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThreshold); this.deactivateCommands(runtime); th... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... |
@Test void cantRun() { final int days = 5; final int negativeDays = -1 * days; final int pageSize = 10; Mockito.when(this.jobCleanupProperties.getRetention()).thenReturn(days).thenReturn(negativeDays); Mockito.when(this.jobCleanupProperties.getPageSize()).thenReturn(pageSize); Mockito .when( this.persistenceService.del... | @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThreshold); this.deactivateCommands(runtime); th... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... |
@Test void skipAll() { this.environment.setProperty( DatabaseCleanupProperties.ApplicationDatabaseCleanupProperties.SKIP_PROPERTY, "true" ); this.environment.setProperty(DatabaseCleanupProperties.CommandDatabaseCleanupProperties.SKIP_PROPERTY, "true"); this.environment.setProperty( DatabaseCleanupProperties.CommandDeac... | @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThreshold); this.deactivateCommands(runtime); th... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... | DatabaseCleanupTask extends LeaderTask { @Override public void run() { final long start = System.nanoTime(); final Instant runtime = Instant.now(); final Set<Tag> tags = Sets.newHashSet(); try { this.deleteJobs(); final Instant creationThreshold = runtime.minus(1L, ChronoUnit.HOURS); this.deleteClusters(creationThresho... |
@Test void canStartLeadershipTasks() { final long task1Period = 13238; Mockito.when(this.task1.getScheduleType()).thenReturn(GenieTaskScheduleType.FIXED_RATE); Mockito.when(this.task1.getFixedRate()).thenReturn(task1Period); final long task2Period = 3891082; Mockito.when(this.task2.getScheduleType()).thenReturn(GenieTa... | @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { case TRIGGER: final Trigger ... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... |
@Test @SuppressWarnings("unchecked") void canStopLeadershipTasks() { final long task1Period = 13238; Mockito.when(this.task1.getScheduleType()).thenReturn(GenieTaskScheduleType.FIXED_RATE); Mockito.when(this.task1.getFixedRate()).thenReturn(task1Period); final long task2Period = 3891082; Mockito.when(this.task2.getSche... | @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { case TRIGGER: final Trigger ... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... |
@Test void doesIgnoreUnknownEvent() { final AbstractLeaderEvent leaderEvent = new AbstractLeaderEvent(this) { @Override public Context getContext() { return new Context() { @Override public boolean isLeader() { return false; } @Override public void yield() { } }; } }; this.coordinator.onLeaderEvent(leaderEvent); Mockit... | @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { case TRIGGER: final Trigger ... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... | LeaderTasksCoordinator { @EventListener public synchronized void onLeaderEvent(final AbstractLeaderEvent leaderEvent) { if (leaderEvent instanceof OnGrantedEvent) { if (this.isRunning) { return; } log.info("Leadership granted."); this.isRunning = true; this.tasks.forEach( task -> { switch (task.getScheduleType()) { cas... |
@Test void canShutdown() { final ContextClosedEvent event = Mockito.mock(ContextClosedEvent.class); final TasksCleanup cleanup = new TasksCleanup(this.scheduler); cleanup.onShutdown(event); Mockito.verify(this.scheduler, Mockito.times(1)).shutdown(); } | @EventListener public void onShutdown(final ContextClosedEvent event) { log.info("Shutting down the scheduler due to {}", event); this.scheduler.shutdown(); } | TasksCleanup { @EventListener public void onShutdown(final ContextClosedEvent event) { log.info("Shutting down the scheduler due to {}", event); this.scheduler.shutdown(); } } | TasksCleanup { @EventListener public void onShutdown(final ContextClosedEvent event) { log.info("Shutting down the scheduler due to {}", event); this.scheduler.shutdown(); } @Autowired TasksCleanup(@Qualifier("genieTaskScheduler") @NotNull final ThreadPoolTaskScheduler scheduler); } | TasksCleanup { @EventListener public void onShutdown(final ContextClosedEvent event) { log.info("Shutting down the scheduler due to {}", event); this.scheduler.shutdown(); } @Autowired TasksCleanup(@Qualifier("genieTaskScheduler") @NotNull final ThreadPoolTaskScheduler scheduler); @EventListener void onShutdown(final ... | TasksCleanup { @EventListener public void onShutdown(final ContextClosedEvent event) { log.info("Shutting down the scheduler due to {}", event); this.scheduler.shutdown(); } @Autowired TasksCleanup(@Qualifier("genieTaskScheduler") @NotNull final ThreadPoolTaskScheduler scheduler); @EventListener void onShutdown(final ... |
@Test void canRunWithoutSudo(@TempDir final Path tempDir) throws IOException, GenieException { final JobsProperties jobsProperties = JobsProperties.getJobsPropertiesDefaults(); jobsProperties.getUsers().setRunAsUserEnabled(false); final Path testFile = tempDir.resolve(UUID.randomUUID().toString()); Files.write(testFile... | @Override public void run() { log.info("Running disk cleanup task..."); final File[] jobDirs = this.jobsDir.listFiles(); if (jobDirs == null) { log.warn("No job dirs found. Returning."); this.numberOfDeletedJobDirs.set(0); this.numberOfDirsUnableToDelete.set(0); return; } long deletedCount = 0; long unableToDeleteCount... | DiskCleanupTask implements Runnable { @Override public void run() { log.info("Running disk cleanup task..."); final File[] jobDirs = this.jobsDir.listFiles(); if (jobDirs == null) { log.warn("No job dirs found. Returning."); this.numberOfDeletedJobDirs.set(0); this.numberOfDirsUnableToDelete.set(0); return; } long dele... | DiskCleanupTask implements Runnable { @Override public void run() { log.info("Running disk cleanup task..."); final File[] jobDirs = this.jobsDir.listFiles(); if (jobDirs == null) { log.warn("No job dirs found. Returning."); this.numberOfDeletedJobDirs.set(0); this.numberOfDirsUnableToDelete.set(0); return; } long dele... | DiskCleanupTask implements Runnable { @Override public void run() { log.info("Running disk cleanup task..."); final File[] jobDirs = this.jobsDir.listFiles(); if (jobDirs == null) { log.warn("No job dirs found. Returning."); this.numberOfDeletedJobDirs.set(0); this.numberOfDirsUnableToDelete.set(0); return; } long dele... | DiskCleanupTask implements Runnable { @Override public void run() { log.info("Running disk cleanup task..."); final File[] jobDirs = this.jobsDir.listFiles(); if (jobDirs == null) { log.warn("No job dirs found. Returning."); this.numberOfDeletedJobDirs.set(0); this.numberOfDirsUnableToDelete.set(0); return; } long dele... |
@Test void canConvertToModel() { final EntityModel<Application> model = this.assembler.toModel(this.application); Assertions.assertThat(model.getLinks()).hasSize(2); Assertions.assertThat(model.getLink("self")).isPresent(); Assertions.assertThat(model.getLink("commands")).isPresent(); } | @Override @Nonnull public EntityModel<Application> toModel(final Application application) { final String id = application.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Application> applicationModel = new EntityModel<>(application); try { applicationModel.add( WebMvcLinkBuilder.linkTo( WebMvcLink... | ApplicationModelAssembler implements RepresentationModelAssembler<Application, EntityModel<Application>> { @Override @Nonnull public EntityModel<Application> toModel(final Application application) { final String id = application.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Application> applicat... | ApplicationModelAssembler implements RepresentationModelAssembler<Application, EntityModel<Application>> { @Override @Nonnull public EntityModel<Application> toModel(final Application application) { final String id = application.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Application> applicat... | ApplicationModelAssembler implements RepresentationModelAssembler<Application, EntityModel<Application>> { @Override @Nonnull public EntityModel<Application> toModel(final Application application) { final String id = application.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Application> applicat... | ApplicationModelAssembler implements RepresentationModelAssembler<Application, EntityModel<Application>> { @Override @Nonnull public EntityModel<Application> toModel(final Application application) { final String id = application.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Application> applicat... |
@Test public void canConvertToModel() { final EntityModel<Job> model = this.assembler.toModel(this.job); Assertions.assertThat(model.getLinks()).hasSize(9); Assertions.assertThat(model.getLink("self")).isPresent(); Assertions.assertThat(model.getLink("output")).isPresent(); Assertions.assertThat(model.getLink("request"... | @Override @Nonnull public EntityModel<Job> toModel(final Job job) { final String id = job.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Job> jobModel = new EntityModel<>(job); try { jobModel.add( WebMvcLinkBuilder.linkTo( WebMvcLinkBuilder .methodOn(JobRestController.class) .getJob(id) ).withSel... | JobModelAssembler implements RepresentationModelAssembler<Job, EntityModel<Job>> { @Override @Nonnull public EntityModel<Job> toModel(final Job job) { final String id = job.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Job> jobModel = new EntityModel<>(job); try { jobModel.add( WebMvcLinkBuilder... | JobModelAssembler implements RepresentationModelAssembler<Job, EntityModel<Job>> { @Override @Nonnull public EntityModel<Job> toModel(final Job job) { final String id = job.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Job> jobModel = new EntityModel<>(job); try { jobModel.add( WebMvcLinkBuilder... | JobModelAssembler implements RepresentationModelAssembler<Job, EntityModel<Job>> { @Override @Nonnull public EntityModel<Job> toModel(final Job job) { final String id = job.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Job> jobModel = new EntityModel<>(job); try { jobModel.add( WebMvcLinkBuilder... | JobModelAssembler implements RepresentationModelAssembler<Job, EntityModel<Job>> { @Override @Nonnull public EntityModel<Job> toModel(final Job job) { final String id = job.getId().orElseThrow(IllegalArgumentException::new); final EntityModel<Job> jobModel = new EntityModel<>(job); try { jobModel.add( WebMvcLinkBuilder... |
@Test void canConvertToJson() throws Exception { this.setupWithParent(); final String json = this.writer.toJson(this.directory, REQUEST_URL_WITH_PARENT, true); Assertions.assertThat(json).isNotNull(); final DefaultDirectoryWriter.Directory dir = GenieObjectMapper.getMapper().readValue(json, DefaultDirectoryWriter.Direc... | @Override public String toJson( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws Exception { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return GenieObjectMapper.getMapper().writeValueAsString(dir); } | DefaultDirectoryWriter implements DirectoryWriter { @Override public String toJson( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws Exception { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return GenieObjectMapper.getMapper().writeValue... | DefaultDirectoryWriter implements DirectoryWriter { @Override public String toJson( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws Exception { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return GenieObjectMapper.getMapper().writeValue... | DefaultDirectoryWriter implements DirectoryWriter { @Override public String toJson( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws Exception { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return GenieObjectMapper.getMapper().writeValue... | DefaultDirectoryWriter implements DirectoryWriter { @Override public String toJson( @NotNull final File directory, @URL final String requestURL, final boolean includeParent ) throws Exception { final Directory dir = this.getDirectory(directory, requestURL, includeParent); return GenieObjectMapper.getMapper().writeValue... |
@Test public void testGetAddress() throws Exception { String address = client.getAddress(); Assert.assertEquals(null, address); client.setAddress("Address"); address = client.getAddress(); Assert.assertEquals("Address", address); } | public String getAddress() { return address; } | Entity_Feature { public String getAddress() { return address; } } | Entity_Feature { public String getAddress() { return address; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_type);... | Entity_Feature { public String getAddress() { return address; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_type);... | Entity_Feature { public String getAddress() { return address; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_type);... |
@Test public void testGetPlace_type() throws Exception { Entity_Feature_Association feature_association = new Entity_Feature_Association(0, null, 0, 0, null); } | public String getPlace_type() { return place_type; } | Entity_Feature_Association { public String getPlace_type() { return place_type; } } | Entity_Feature_Association { public String getPlace_type() { return place_type; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); } | Entity_Feature_Association { public String getPlace_type() { return place_type; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int getDevi... | Entity_Feature_Association { public String getPlace_type() { return place_type; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int getDevi... |
@Test public void testGetDevice_feature_id() throws Exception { Entity_Feature_Association feature_association = new Entity_Feature_Association(0, null, 0, 0, null); int Device_feature_id = feature_association.getDevice_feature_id(); Assert.assertEquals(0, Device_feature_id); feature_association.setDevice_feature_id(12... | public int getDevice_feature_id() { return device_feature_id; } | Entity_Feature_Association { public int getDevice_feature_id() { return device_feature_id; } } | Entity_Feature_Association { public int getDevice_feature_id() { return device_feature_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); } | Entity_Feature_Association { public int getDevice_feature_id() { return device_feature_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); ... | Entity_Feature_Association { public int getDevice_feature_id() { return device_feature_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); ... |
@Test public void testGetId() throws Exception { Entity_Feature_Association feature_association = new Entity_Feature_Association(0, null, 0, 0, null); int id = feature_association.getId(); Assert.assertEquals(0, id); feature_association.setId(125); id = feature_association.getId(); Assert.assertEquals(125, id); } | public int getId() { return id; } | Entity_Feature_Association { public int getId() { return id; } } | Entity_Feature_Association { public int getId() { return id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); } | Entity_Feature_Association { public int getId() { return id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int getDevice_feature_id(); vo... | Entity_Feature_Association { public int getId() { return id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int getDevice_feature_id(); vo... |
@Test public void testGetDevice_feature() throws Exception { Entity_Feature_Association feature_association = new Entity_Feature_Association(0, null, 0, 0, null); JSONObject device_feature = feature_association.getDevice_feature(); feature_association.setDevice_feature(new JSONObject("")); device_feature = feature_asso... | public JSONObject getDevice_feature() { return json_device_feature; } | Entity_Feature_Association { public JSONObject getDevice_feature() { return json_device_feature; } } | Entity_Feature_Association { public JSONObject getDevice_feature() { return json_device_feature; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); } | Entity_Feature_Association { public JSONObject getDevice_feature() { return json_device_feature; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeT... | Entity_Feature_Association { public JSONObject getDevice_feature() { return json_device_feature; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeT... |
@Test public void testGetFeat_model_id() throws Exception { Entity_Feature_Association feature_association = new Entity_Feature_Association(0, null, 0, 0, null); String feature_model_id = feature_association.getFeat_model_id(); Assert.assertEquals(null, feature_model_id); JSONObject device_feature_model_id = new JSONOb... | public String getFeat_model_id() { return feat_model_id; } | Entity_Feature_Association { public String getFeat_model_id() { return feat_model_id; } } | Entity_Feature_Association { public String getFeat_model_id() { return feat_model_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); } | Entity_Feature_Association { public String getFeat_model_id() { return feat_model_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int g... | Entity_Feature_Association { public String getFeat_model_id() { return feat_model_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int g... |
@Test public void testGetFeat_id() throws Exception { Entity_Feature_Association feature_association = new Entity_Feature_Association(0, null, 0, 0, null); int feature_id = feature_association.getFeat_id(); Assert.assertEquals(0, feature_id); JSONObject device_feature_model_id = new JSONObject(); device_feature_model_i... | public int getFeat_id() { return feat_id; } | Entity_Feature_Association { public int getFeat_id() { return feat_id; } } | Entity_Feature_Association { public int getFeat_id() { return feat_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); } | Entity_Feature_Association { public int getFeat_id() { return feat_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int getDevice_featur... | Entity_Feature_Association { public int getFeat_id() { return feat_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int getDevice_featur... |
@Test public void testGetFeat_device_id() throws Exception { Entity_Feature_Association feature_association = new Entity_Feature_Association(0, null, 0, 0, null); int feature_device_id = feature_association.getFeat_device_id(); Assert.assertEquals(0, feature_device_id); JSONObject device_feature_model_id = new JSONObje... | public int getFeat_device_id() { return feat_device_id; } | Entity_Feature_Association { public int getFeat_device_id() { return feat_device_id; } } | Entity_Feature_Association { public int getFeat_device_id() { return feat_device_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); } | Entity_Feature_Association { public int getFeat_device_id() { return feat_device_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int ge... | Entity_Feature_Association { public int getFeat_device_id() { return feat_device_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int ge... |
@Test public void testGetClientType() throws Exception { int type = client.getClientType(); Assert.assertEquals(0, type); client.setClientType(125); type = client.getClientType(); Assert.assertEquals(125, type); } | public int getClientType() { return client_type; } | Entity_client { public int getClientType() { return client_type; } } | Entity_client { public int getClientType() { return client_type; } Entity_client(int devId, String skey, String Name, int session_type); } | Entity_client { public int getClientType() { return client_type; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String ... | Entity_client { public int getClientType() { return client_type; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String ... |
@Test public void testGetClientId() throws Exception { int id = client.getClientId(); Assert.assertEquals(-1, id); client.setClientId(125); id = client.getClientId(); Assert.assertEquals(125, id); } | public int getClientId() { return client_id; } | Entity_client { public int getClientId() { return client_id; } } | Entity_client { public int getClientId() { return client_id; } Entity_client(int devId, String skey, String Name, int session_type); } | Entity_client { public int getClientId() { return client_id; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Name... | Entity_client { public int getClientId() { return client_id; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Name... |
@Test public void testGetcacheId() throws Exception { int cacheid = client.getcacheId(); Assert.assertEquals(0, cacheid); client.setcacheId(125); cacheid = client.getcacheId(); Assert.assertEquals(125, cacheid); } | public int getcacheId() { return cache_id; } | Entity_client { public int getcacheId() { return cache_id; } } | Entity_client { public int getcacheId() { return cache_id; } Entity_client(int devId, String skey, String Name, int session_type); } | Entity_client { public int getcacheId() { return cache_id; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Name);... | Entity_client { public int getcacheId() { return cache_id; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Name);... |
@Test public void testGetDevice_feature_model_id() throws Exception { String device_feature_model_id = client.getDevice_feature_model_id(); Assert.assertEquals(null, device_feature_model_id); client.setDevice_feature_model_id("Device_feature_model_id"); device_feature_model_id = client.getDevice_feature_model_id(); Ass... | public String getDevice_feature_model_id() { return device_feature_model_id; } | Entity_Feature { public String getDevice_feature_model_id() { return device_feature_model_id; } } | Entity_Feature { public String getDevice_feature_model_id() { return device_feature_model_id; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String... | Entity_Feature { public String getDevice_feature_model_id() { return device_feature_model_id; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String... | Entity_Feature { public String getDevice_feature_model_id() { return device_feature_model_id; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String... |
@Test public void testGetDevId() throws Exception { int DevId = client.getDevId(); Assert.assertEquals(0, DevId); client.setDevId(125); DevId = client.getDevId(); Assert.assertEquals(125, DevId); } | public int getDevId() { return devId; } | Entity_client { public int getDevId() { return devId; } } | Entity_client { public int getDevId() { return devId; } Entity_client(int devId, String skey, String Name, int session_type); } | Entity_client { public int getDevId() { return devId; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Name); void... | Entity_client { public int getDevId() { return devId; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Name); void... |
@Test public void testGetskey() throws Exception { String skey = client.getskey(); Assert.assertEquals(null, skey); client.setskey("Skey"); skey = client.getskey(); Assert.assertEquals("Skey", skey); } | public String getskey() { return skey; } | Entity_client { public String getskey() { return skey; } } | Entity_client { public String getskey() { return skey; } Entity_client(int devId, String skey, String Name, int session_type); } | Entity_client { public String getskey() { return skey; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Name); voi... | Entity_client { public String getskey() { return skey; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Name); voi... |
@Test public void testGetValue() throws Exception { String value = client.getValue(); Assert.assertEquals(null, value); client.setValue("Value"); value = client.getValue(); Assert.assertEquals("Value", value); } | public String getValue() { return currentState; } | Entity_client { public String getValue() { return currentState; } } | Entity_client { public String getValue() { return currentState; } Entity_client(int devId, String skey, String Name, int session_type); } | Entity_client { public String getValue() { return currentState; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String N... | Entity_client { public String getValue() { return currentState; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String N... |
@Test public void testGetName() throws Exception { String name = client.getName(); Assert.assertEquals(null, name); client.setName("Name"); name = client.getName(); Assert.assertEquals("Name", name); } | public String getName() { return client_name; } | Entity_client { public String getName() { return client_name; } } | Entity_client { public String getName() { return client_name; } Entity_client(int devId, String skey, String Name, int session_type); } | Entity_client { public String getName() { return client_name; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Nam... | Entity_client { public String getName() { return client_name; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String Nam... |
@Test public void testGetTimestamp() throws Exception { String timestamp = client.getTimestamp(); Assert.assertEquals(null, timestamp); client.setTimestamp("Timestamp"); timestamp = client.getTimestamp(); Assert.assertEquals("Timestamp", timestamp); } | public String getTimestamp() { return timestamp; } | Entity_client { public String getTimestamp() { return timestamp; } } | Entity_client { public String getTimestamp() { return timestamp; } Entity_client(int devId, String skey, String Name, int session_type); } | Entity_client { public String getTimestamp() { return timestamp; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String ... | Entity_client { public String getTimestamp() { return timestamp; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(String ... |
@Test public void testIs_Miniwidget() throws Exception { Boolean type = client.is_Miniwidget(); Assert.assertEquals(false, type); client.setType(true); type = client.is_Miniwidget(); Assert.assertEquals(true, type); } | public Boolean is_Miniwidget() { return miniwidget; } | Entity_client { public Boolean is_Miniwidget() { return miniwidget; } } | Entity_client { public Boolean is_Miniwidget() { return miniwidget; } Entity_client(int devId, String skey, String Name, int session_type); } | Entity_client { public Boolean is_Miniwidget() { return miniwidget; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(Stri... | Entity_client { public Boolean is_Miniwidget() { return miniwidget; } Entity_client(int devId, String skey, String Name, int session_type); void setClientType(int type); void setClientId(int id); void setcacheId(int Id); void setDevId(int devId); void setskey(String skey); void setValue(String Value); void setName(Stri... |
@Test public void testGetState_key() throws Exception { String state_key = client.getState_key(); Assert.assertEquals(null, state_key); client.setState_key("State_key"); state_key = client.getState_key(); Assert.assertEquals("State_key", state_key); } | public String getState_key() { return state_key; } | Entity_Feature { public String getState_key() { return state_key; } } | Entity_Feature { public String getState_key() { return state_key; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_ty... | Entity_Feature { public String getState_key() { return state_key; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_ty... | Entity_Feature { public String getState_key() { return state_key; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_ty... |
@Test public void testGetParameters() throws Exception { String parameters = client.getParameters(); Assert.assertEquals(null, parameters); client.setParameters("Parameters"); parameters = client.getParameters(); Assert.assertEquals("Parameters", parameters); } | public String getParameters() { return parameters; } | Entity_Feature { public String getParameters() { return parameters; } } | Entity_Feature { public String getParameters() { return parameters; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_... | Entity_Feature { public String getParameters() { return parameters; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_... | Entity_Feature { public String getParameters() { return parameters; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_... |
@Test public void testGetValue_type() throws Exception { String value_type = client.getValue_type(); Assert.assertEquals(null, value_type); client.setValue_type("Value_Type"); value_type = client.getValue_type(); Assert.assertEquals("Value_Type", value_type); } | public String getValue_type() { return value_type; } | Entity_Feature { public String getValue_type() { return value_type; } } | Entity_Feature { public String getValue_type() { return value_type; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_... | Entity_Feature { public String getValue_type() { return value_type; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_... | Entity_Feature { public String getValue_type() { return value_type; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, String value_... |
@Test public void testGetDevice_type() throws Exception { String device_type = client.getDevice_type(); Assert.assertEquals(null, device_type); client.setDevice_type_id("device_type"); device_type = client.getDevice_type(); Assert.assertEquals("device_type", device_type); client.setDevice_type_id("device_type.devicepar... | public String getDevice_type() { if (device_type_id != null) { String[] model = device_type_id.split("\\."); try { return model[1]; } catch (Exception e) { return model[0]; } } else return null; } | Entity_Feature { public String getDevice_type() { if (device_type_id != null) { String[] model = device_type_id.split("\\."); try { return model[1]; } catch (Exception e) { return model[0]; } } else return null; } } | Entity_Feature { public String getDevice_type() { if (device_type_id != null) { String[] model = device_type_id.split("\\."); try { return model[1]; } catch (Exception e) { return model[0]; } } else return null; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, St... | Entity_Feature { public String getDevice_type() { if (device_type_id != null) { String[] model = device_type_id.split("\\."); try { return model[1]; } catch (Exception e) { return model[0]; } } else return null; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, St... | Entity_Feature { public String getDevice_type() { if (device_type_id != null) { String[] model = device_type_id.split("\\."); try { return model[1]; } catch (Exception e) { return model[0]; } } else return null; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, St... |
@Test public void testGetDevice_type_id() throws Exception { String device_type_id = client.getDevice_type_id(); Assert.assertEquals(null, device_type_id); client.setDevice_type_id("Device_Type_ID"); device_type_id = client.getDevice_type_id(); Assert.assertEquals("Device_Type_ID", device_type_id); } | public String getDevice_type_id() { return device_type_id; } | Entity_Feature { public String getDevice_type_id() { return device_type_id; } } | Entity_Feature { public String getDevice_type_id() { return device_type_id; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, Strin... | Entity_Feature { public String getDevice_type_id() { return device_type_id; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, Strin... | Entity_Feature { public String getDevice_type_id() { return device_type_id; } Entity_Feature(tracerengine Trac, Activity activity, String device_feature_model_id, int id, int devId, String device_usage_id, String address, String device_type_id, String description, String name, String state_key, String parameters, Strin... |
@Test public void testGetIcon_name() throws Exception { } | public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_feature"; try { iconName = domodb.requestIcons(id, "feature").getValue(); } catch (Exception e) { } if (iconName.equals("unknow")) iconName = device_usage_id; return iconName... | Entity_Feature { public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_feature"; try { iconName = domodb.requestIcons(id, "feature").getValue(); } catch (Exception e) { } if (iconName.equals("unknow")) iconName = device_usage_id... | Entity_Feature { public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_feature"; try { iconName = domodb.requestIcons(id, "feature").getValue(); } catch (Exception e) { } if (iconName.equals("unknow")) iconName = device_usage_id... | Entity_Feature { public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_feature"; try { iconName = domodb.requestIcons(id, "feature").getValue(); } catch (Exception e) { } if (iconName.equals("unknow")) iconName = device_usage_id... | Entity_Feature { public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_feature"; try { iconName = domodb.requestIcons(id, "feature").getValue(); } catch (Exception e) { } if (iconName.equals("unknow")) iconName = device_usage_id... |
@Test public void testGetIcon_name() throws Exception { } | public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_area"; try { iconName = domodb.requestIcons(id, "area").getValue(); } catch (Exception e) { } return iconName; } | Entity_Area { public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_area"; try { iconName = domodb.requestIcons(id, "area").getValue(); } catch (Exception e) { } return iconName; } } | Entity_Area { public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_area"; try { iconName = domodb.requestIcons(id, "area").getValue(); } catch (Exception e) { } return iconName; } Entity_Area(tracerengine Trac, Activity activit... | Entity_Area { public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_area"; try { iconName = domodb.requestIcons(id, "area").getValue(); } catch (Exception e) { } return iconName; } Entity_Area(tracerengine Trac, Activity activit... | Entity_Area { public String getIcon_name() { String iconName = "unknow"; DomodroidDB domodb = DomodroidDB.getInstance(Tracer, activity); domodb.owner = "entity_area"; try { iconName = domodb.requestIcons(id, "area").getValue(); } catch (Exception e) { } return iconName; } Entity_Area(tracerengine Trac, Activity activit... |
@Test public void testGetPlace_id() throws Exception { Entity_Feature_Association feature_association = new Entity_Feature_Association(0, null, 0, 0, null); int placeid = feature_association.getPlace_id(); Assert.assertEquals(0, placeid); feature_association.setPlace_id(125); placeid = feature_association.getPlace_id()... | public int getPlace_id() { return place_id; } | Entity_Feature_Association { public int getPlace_id() { return place_id; } } | Entity_Feature_Association { public int getPlace_id() { return place_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); } | Entity_Feature_Association { public int getPlace_id() { return place_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int getDevice_feat... | Entity_Feature_Association { public int getPlace_id() { return place_id; } Entity_Feature_Association(int place_id, String place_type, int device_feature_id, int id, String device_feature); int getPlace_id(); void setPlace_id(int placeId); String getPlace_type(); void setPlace_type(String placeType); int getDevice_feat... |
@Test public void testRecommendFriends() throws Exception { ObjectMapper mapper = new ObjectMapper(); this.webClient.get().uri("/v1/users/1/commands/recommendFriends") .accept(MediaType.APPLICATION_JSON) .exchange().expectBody() .json(mapper.writeValueAsString(friendRepository.recommendedFriends(1L).toList().toArray())... | @GetMapping(path = "/users/{userId}/commands/recommendFriends") public Flux<RankedUser> recommendFriends(@PathVariable Long userId) { return Flux.fromIterable(friendRepository.recommendedFriends(userId)); } | UserController { @GetMapping(path = "/users/{userId}/commands/recommendFriends") public Flux<RankedUser> recommendFriends(@PathVariable Long userId) { return Flux.fromIterable(friendRepository.recommendedFriends(userId)); } } | UserController { @GetMapping(path = "/users/{userId}/commands/recommendFriends") public Flux<RankedUser> recommendFriends(@PathVariable Long userId) { return Flux.fromIterable(friendRepository.recommendedFriends(userId)); } UserController(FriendRepository friendRepository); } | UserController { @GetMapping(path = "/users/{userId}/commands/recommendFriends") public Flux<RankedUser> recommendFriends(@PathVariable Long userId) { return Flux.fromIterable(friendRepository.recommendedFriends(userId)); } UserController(FriendRepository friendRepository); @GetMapping(path = "/users/{userId}/commands/... | UserController { @GetMapping(path = "/users/{userId}/commands/recommendFriends") public Flux<RankedUser> recommendFriends(@PathVariable Long userId) { return Flux.fromIterable(friendRepository.recommendedFriends(userId)); } UserController(FriendRepository friendRepository); @GetMapping(path = "/users/{userId}/commands/... |
@Ignore @Test public final void testMain() { fail("Not yet implemented"); } | public static void main(String[] args) { Option helpOpt = new Option("h", "help", false, "show this help message"); Option logIngestOpt = new Option("l", LOG_INGEST, false, "begin log ingest"); Option metaIngestOpt = new Option("m", META_INGEST, false, "begin metadata ingest"); Option fullIngestOpt = new Option("f", FU... | MudrodEngine { public static void main(String[] args) { Option helpOpt = new Option("h", "help", false, "show this help message"); Option logIngestOpt = new Option("l", LOG_INGEST, false, "begin log ingest"); Option metaIngestOpt = new Option("m", META_INGEST, false, "begin metadata ingest"); Option fullIngestOpt = new... | MudrodEngine { public static void main(String[] args) { Option helpOpt = new Option("h", "help", false, "show this help message"); Option logIngestOpt = new Option("l", LOG_INGEST, false, "begin log ingest"); Option metaIngestOpt = new Option("m", META_INGEST, false, "begin metadata ingest"); Option fullIngestOpt = new... | MudrodEngine { public static void main(String[] args) { Option helpOpt = new Option("h", "help", false, "show this help message"); Option logIngestOpt = new Option("l", LOG_INGEST, false, "begin log ingest"); Option metaIngestOpt = new Option("m", META_INGEST, false, "begin metadata ingest"); Option fullIngestOpt = new... | MudrodEngine { public static void main(String[] args) { Option helpOpt = new Option("h", "help", false, "show this help message"); Option logIngestOpt = new Option("l", LOG_INGEST, false, "begin log ingest"); Option metaIngestOpt = new Option("m", META_INGEST, false, "begin metadata ingest"); Option fullIngestOpt = new... |
@Ignore @Test public final void testLoad() throws IOException { lOnt.load(); assertTrue("Resource list should have a minimum of one resource.", lOnt.getLoadedOntologyResources().size() == 1); } | @Override public void load() { URL ontURL = null; try { ontURL = new URL("http: } catch (MalformedURLException e) { LOG.error("Error when attempting to create URL resource: ", e); } ontArrayList = new ArrayList<>(); try { if(ontURL != null){ ontArrayList.add(ontURL.toURI().toString()); } } catch (URISyntaxException e) ... | LocalOntology implements Ontology { @Override public void load() { URL ontURL = null; try { ontURL = new URL("http: } catch (MalformedURLException e) { LOG.error("Error when attempting to create URL resource: ", e); } ontArrayList = new ArrayList<>(); try { if(ontURL != null){ ontArrayList.add(ontURL.toURI().toString()... | LocalOntology implements Ontology { @Override public void load() { URL ontURL = null; try { ontURL = new URL("http: } catch (MalformedURLException e) { LOG.error("Error when attempting to create URL resource: ", e); } ontArrayList = new ArrayList<>(); try { if(ontURL != null){ ontArrayList.add(ontURL.toURI().toString()... | LocalOntology implements Ontology { @Override public void load() { URL ontURL = null; try { ontURL = new URL("http: } catch (MalformedURLException e) { LOG.error("Error when attempting to create URL resource: ", e); } ontArrayList = new ArrayList<>(); try { if(ontURL != null){ ontArrayList.add(ontURL.toURI().toString()... | LocalOntology implements Ontology { @Override public void load() { URL ontURL = null; try { ontURL = new URL("http: } catch (MalformedURLException e) { LOG.error("Error when attempting to create URL resource: ", e); } ontArrayList = new ArrayList<>(); try { if(ontURL != null){ ontArrayList.add(ontURL.toURI().toString()... |
@Ignore @Test public final void testSubclasses() { fail("Not yet implemented"); } | @Override public Iterator<String> subclasses(String entitySearchTerm) { Map<OntResource, String> classMap = retrieve(entitySearchTerm); Map<String, String> subclasses = new HashMap<>(); for (OntResource resource : classMap.keySet()) { if (resource instanceof OntClass) { for (Iterator<?> i = ((OntClass) resource).listSu... | LocalOntology implements Ontology { @Override public Iterator<String> subclasses(String entitySearchTerm) { Map<OntResource, String> classMap = retrieve(entitySearchTerm); Map<String, String> subclasses = new HashMap<>(); for (OntResource resource : classMap.keySet()) { if (resource instanceof OntClass) { for (Iterator... | LocalOntology implements Ontology { @Override public Iterator<String> subclasses(String entitySearchTerm) { Map<OntResource, String> classMap = retrieve(entitySearchTerm); Map<String, String> subclasses = new HashMap<>(); for (OntResource resource : classMap.keySet()) { if (resource instanceof OntClass) { for (Iterator... | LocalOntology implements Ontology { @Override public Iterator<String> subclasses(String entitySearchTerm) { Map<OntResource, String> classMap = retrieve(entitySearchTerm); Map<String, String> subclasses = new HashMap<>(); for (OntResource resource : classMap.keySet()) { if (resource instanceof OntClass) { for (Iterator... | LocalOntology implements Ontology { @Override public Iterator<String> subclasses(String entitySearchTerm) { Map<OntResource, String> classMap = retrieve(entitySearchTerm); Map<String, String> subclasses = new HashMap<>(); for (OntResource resource : classMap.keySet()) { if (resource instanceof OntClass) { for (Iterator... |
@Ignore @Test public final void testAddSearchTerm() { fail("Not yet implemented"); } | public void addSearchTerm(String label, OntResource resource) { Map<OntResource, String> m = retrieve(label); if (m == null) { m = new HashMap<>(); } m.put(resource, "1"); searchTerms.put(label.toLowerCase(Locale.ENGLISH), m); } | LocalOntology implements Ontology { public void addSearchTerm(String label, OntResource resource) { Map<OntResource, String> m = retrieve(label); if (m == null) { m = new HashMap<>(); } m.put(resource, "1"); searchTerms.put(label.toLowerCase(Locale.ENGLISH), m); } } | LocalOntology implements Ontology { public void addSearchTerm(String label, OntResource resource) { Map<OntResource, String> m = retrieve(label); if (m == null) { m = new HashMap<>(); } m.put(resource, "1"); searchTerms.put(label.toLowerCase(Locale.ENGLISH), m); } LocalOntology(); } | LocalOntology implements Ontology { public void addSearchTerm(String label, OntResource resource) { Map<OntResource, String> m = retrieve(label); if (m == null) { m = new HashMap<>(); } m.put(resource, "1"); searchTerms.put(label.toLowerCase(Locale.ENGLISH), m); } LocalOntology(); Ontology getInstance(); @Override void... | LocalOntology implements Ontology { public void addSearchTerm(String label, OntResource resource) { Map<OntResource, String> m = retrieve(label); if (m == null) { m = new HashMap<>(); } m.put(resource, "1"); searchTerms.put(label.toLowerCase(Locale.ENGLISH), m); } LocalOntology(); Ontology getInstance(); @Override void... |
@Ignore @Test public final void testRetrieve() { fail("Not yet implemented"); } | public Map<OntResource, String> retrieve(String label) { @SuppressWarnings("unchecked") Map<OntResource, String> m = (Map<OntResource, String>) searchTerms.get(label.toLowerCase(Locale.ENGLISH)); if (m == null) { m = new HashMap<>(); } return m; } | LocalOntology implements Ontology { public Map<OntResource, String> retrieve(String label) { @SuppressWarnings("unchecked") Map<OntResource, String> m = (Map<OntResource, String>) searchTerms.get(label.toLowerCase(Locale.ENGLISH)); if (m == null) { m = new HashMap<>(); } return m; } } | LocalOntology implements Ontology { public Map<OntResource, String> retrieve(String label) { @SuppressWarnings("unchecked") Map<OntResource, String> m = (Map<OntResource, String>) searchTerms.get(label.toLowerCase(Locale.ENGLISH)); if (m == null) { m = new HashMap<>(); } return m; } LocalOntology(); } | LocalOntology implements Ontology { public Map<OntResource, String> retrieve(String label) { @SuppressWarnings("unchecked") Map<OntResource, String> m = (Map<OntResource, String>) searchTerms.get(label.toLowerCase(Locale.ENGLISH)); if (m == null) { m = new HashMap<>(); } return m; } LocalOntology(); Ontology getInstanc... | LocalOntology implements Ontology { public Map<OntResource, String> retrieve(String label) { @SuppressWarnings("unchecked") Map<OntResource, String> m = (Map<OntResource, String>) searchTerms.get(label.toLowerCase(Locale.ENGLISH)); if (m == null) { m = new HashMap<>(); } return m; } LocalOntology(); Ontology getInstanc... |
@Ignore @Test public final void testRenderClassDescription() { fail("Not yet implemented"); } | public static void renderClassDescription(PrintStream out, OntClass c, int depth) { indent(out, depth); if (c.isRestriction()) { renderRestriction(out, c.as(Restriction.class)); } else { if (!c.isAnon()) { out.print("Class "); renderURI(out, c.getModel(), c.getURI()); out.print(c.getLocalName()); out.print(" ["); for (... | LocalOntology implements Ontology { public static void renderClassDescription(PrintStream out, OntClass c, int depth) { indent(out, depth); if (c.isRestriction()) { renderRestriction(out, c.as(Restriction.class)); } else { if (!c.isAnon()) { out.print("Class "); renderURI(out, c.getModel(), c.getURI()); out.print(c.get... | LocalOntology implements Ontology { public static void renderClassDescription(PrintStream out, OntClass c, int depth) { indent(out, depth); if (c.isRestriction()) { renderRestriction(out, c.as(Restriction.class)); } else { if (!c.isAnon()) { out.print("Class "); renderURI(out, c.getModel(), c.getURI()); out.print(c.get... | LocalOntology implements Ontology { public static void renderClassDescription(PrintStream out, OntClass c, int depth) { indent(out, depth); if (c.isRestriction()) { renderRestriction(out, c.as(Restriction.class)); } else { if (!c.isAnon()) { out.print("Class "); renderURI(out, c.getModel(), c.getURI()); out.print(c.get... | LocalOntology implements Ontology { public static void renderClassDescription(PrintStream out, OntClass c, int depth) { indent(out, depth); if (c.isRestriction()) { renderRestriction(out, c.as(Restriction.class)); } else { if (!c.isAnon()) { out.print("Class "); renderURI(out, c.getModel(), c.getURI()); out.print(c.get... |
@Ignore @Test public final void testLoadConfig() { fail("Not yet implemented"); } | public Properties loadConfig() { InputStream configStream = locateConfig(); try { props.load(configStream); for(String key : props.stringPropertyNames()) { props.put(key, props.getProperty(key).trim()); } String rankingModelPath = props.getProperty(MudrodConstants.RANKING_MODEL); props.put(MudrodConstants.RANKING_MODEL... | MudrodEngine { public Properties loadConfig() { InputStream configStream = locateConfig(); try { props.load(configStream); for(String key : props.stringPropertyNames()) { props.put(key, props.getProperty(key).trim()); } String rankingModelPath = props.getProperty(MudrodConstants.RANKING_MODEL); props.put(MudrodConstant... | MudrodEngine { public Properties loadConfig() { InputStream configStream = locateConfig(); try { props.load(configStream); for(String key : props.stringPropertyNames()) { props.put(key, props.getProperty(key).trim()); } String rankingModelPath = props.getProperty(MudrodConstants.RANKING_MODEL); props.put(MudrodConstant... | MudrodEngine { public Properties loadConfig() { InputStream configStream = locateConfig(); try { props.load(configStream); for(String key : props.stringPropertyNames()) { props.put(key, props.getProperty(key).trim()); } String rankingModelPath = props.getProperty(MudrodConstants.RANKING_MODEL); props.put(MudrodConstant... | MudrodEngine { public Properties loadConfig() { InputStream configStream = locateConfig(); try { props.load(configStream); for(String key : props.stringPropertyNames()) { props.put(key, props.getProperty(key).trim()); } String rankingModelPath = props.getProperty(MudrodConstants.RANKING_MODEL); props.put(MudrodConstant... |
@Ignore @Test public final void testStartLogIngest() { fail("Not yet implemented"); } | public void startLogIngest() { DiscoveryEngineAbstract wd = new WeblogDiscoveryEngine(props, es, spark); wd.preprocess(); wd.process(); LOG.info("Logs have been ingested successfully"); } | MudrodEngine { public void startLogIngest() { DiscoveryEngineAbstract wd = new WeblogDiscoveryEngine(props, es, spark); wd.preprocess(); wd.process(); LOG.info("Logs have been ingested successfully"); } } | MudrodEngine { public void startLogIngest() { DiscoveryEngineAbstract wd = new WeblogDiscoveryEngine(props, es, spark); wd.preprocess(); wd.process(); LOG.info("Logs have been ingested successfully"); } MudrodEngine(); } | MudrodEngine { public void startLogIngest() { DiscoveryEngineAbstract wd = new WeblogDiscoveryEngine(props, es, spark); wd.preprocess(); wd.process(); LOG.info("Logs have been ingested successfully"); } MudrodEngine(); ESDriver startESDriver(); SparkDriver startSparkDriver(); Properties getConfig(); ESDriver getESDrive... | MudrodEngine { public void startLogIngest() { DiscoveryEngineAbstract wd = new WeblogDiscoveryEngine(props, es, spark); wd.preprocess(); wd.process(); LOG.info("Logs have been ingested successfully"); } MudrodEngine(); ESDriver startESDriver(); SparkDriver startSparkDriver(); Properties getConfig(); ESDriver getESDrive... |
@Test public void test_singleTerm() throws SyntaxError { QParser parser = new SimilarityParser("first",new ModifiableSolrParams(),mockCorrectParams,req("first")); Query luceneQuery = parser.parse(); AugmentedTermQuery expected = new AugmentedTermQuery( AugmentedTermQuery.ModelMethod.Generalized, new Term("text", "first... | public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream tokenStream = analyzer.tokenStream... | SimilarityParser extends QParser { public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream... | SimilarityParser extends QParser { public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream... | SimilarityParser extends QParser { public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream... | SimilarityParser extends QParser { public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream... |
@Test public void test_twoTerm() throws SyntaxError { QParser parser = new SimilarityParser("first second",new ModifiableSolrParams(),mockCorrectParams,req("first second")); Query luceneQuery = parser.parse(); Assert.assertEquals(BooleanQuery.class, luceneQuery.getClass()); BooleanQuery realQuery = (BooleanQuery)lucene... | public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream tokenStream = analyzer.tokenStream... | SimilarityParser extends QParser { public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream... | SimilarityParser extends QParser { public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream... | SimilarityParser extends QParser { public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream... | SimilarityParser extends QParser { public Query parse() throws SyntaxError { final IndexSchema schema = req.getSchema(); String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF)); if(defaultField == null){ defaultField = "*"; } final Analyzer analyzer = schema.getQueryAnalyzer(); TokenStream... |
@Test public void testSetAttribute(){ GraphRelationship graphRelationship = createGraphRelationship(); OperationPipeline pipeline = new OperationPipeline(); BatchMutation batchMutation = new MockBatchMutation(); GraphRelationshipMutation graphRelationshipMutation = new GraphRelationshipMutation(graphRelationship, pipel... | @Override public Mutation setAttribute(Name name, Object value) { operatons.setAttributeValue(name, value); return this; } | GraphRelationshipMutation implements Mutation { @Override public Mutation setAttribute(Name name, Object value) { operatons.setAttributeValue(name, value); return this; } } | GraphRelationshipMutation implements Mutation { @Override public Mutation setAttribute(Name name, Object value) { operatons.setAttributeValue(name, value); return this; } GraphRelationshipMutation(Relationship relationship,
OperationPipeline pipeline,
BatchMutation batchMutation); } | GraphRelationshipMutation implements Mutation { @Override public Mutation setAttribute(Name name, Object value) { operatons.setAttributeValue(name, value); return this; } GraphRelationshipMutation(Relationship relationship,
OperationPipeline pipeline,
BatchMutation batchMutation); @Override Muta... | GraphRelationshipMutation implements Mutation { @Override public Mutation setAttribute(Name name, Object value) { operatons.setAttributeValue(name, value); return this; } GraphRelationshipMutation(Relationship relationship,
OperationPipeline pipeline,
BatchMutation batchMutation); @Override Muta... |
@Test public void testIncludeAttribute(){ GraphVisitor repository = new MockGraphVisitor(); GraphProjection graphProjection = new GraphProjection(repository, new OperationPipeline()); Projection includeAttribute = graphProjection.includeAttribute(TartanImplTestConstants.ATTR_DUMMY_ATTRIBUTE_NAME); assertNotNull(include... | @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } } | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); } | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); @Override Queries.Projection includeAttribute(Attribute.Name... | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); @Override Queries.Projection includeAttribute(Attribute.Name... |
@Test public void testIncludeAttributesFamily(){ GraphVisitor repository = new MockGraphVisitor(); GraphProjection graphProjection = new GraphProjection(repository, new OperationPipeline()); Projection includeAttributes = graphProjection.includeAttributes(TartanImplTestConstants.ATTR_DUMMY_FAMILY); assertNotNull(includ... | @Override public Queries.Projection includeAttributes(Attribute.Family namespace) { getTerminal().include(namespace); return this; } | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttributes(Attribute.Family namespace) { getTerminal().include(namespace); return this; } } | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttributes(Attribute.Family namespace) { getTerminal().include(namespace); return this; } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); } | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttributes(Attribute.Family namespace) { getTerminal().include(namespace); return this; } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); @Override Queries.Projection includeAttribute(A... | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttributes(Attribute.Family namespace) { getTerminal().include(namespace); return this; } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); @Override Queries.Projection includeAttribute(A... |
@Test public void testReadyAndExecute(){ GraphVisitor repository = new MockGraphVisitor(); GraphProjection graphProjection = new GraphProjection(repository, new OperationPipeline()); Query ready = graphProjection.ready(); OperationResult<Result> execute = ready.execute(); assertNotNull(execute); } | @Override public Query ready() { return new QueryImpl(repository, pipeline); } | GraphProjection implements Queries.Projection { @Override public Query ready() { return new QueryImpl(repository, pipeline); } } | GraphProjection implements Queries.Projection { @Override public Query ready() { return new QueryImpl(repository, pipeline); } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); } | GraphProjection implements Queries.Projection { @Override public Query ready() { return new QueryImpl(repository, pipeline); } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); @Override Queries.Projection includeAttribute(Attribute.Name name); @Override Queries.Projection incl... | GraphProjection implements Queries.Projection { @Override public Query ready() { return new QueryImpl(repository, pipeline); } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); @Override Queries.Projection includeAttribute(Attribute.Name name); @Override Queries.Projection incl... |
@Test public void testTerminalOperationProjection(){ OperationPipeline operationPipeline = new OperationPipeline(); GraphTerminalOperation terminalOperation = new GraphTerminalOperation(); operationPipeline.add(terminalOperation); GraphVisitor repository = new MockGraphVisitor(); GraphProjection graphProjection = new G... | @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } } | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); } | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); @Override Queries.Projection includeAttribute(Attribute.Name... | GraphProjection implements Queries.Projection { @Override public Queries.Projection includeAttribute(Attribute.Name name) { getTerminal().include(name); return this; } @Inject GraphProjection(GraphVisitor repository,
OperationPipeline aPipeline); @Override Queries.Projection includeAttribute(Attribute.Name... |
@Test public void testEntitiesWithNull(){ GraphVisitor repository = new MockGraphVisitor(); GraphLookUpQuery graphLookupQuery = new GraphLookUpQuery(repository); try{ @SuppressWarnings("unused") Projection entities = graphLookupQuery.entities(null); fail("Should have thrown with null entities"); }catch(Exception e){ as... | @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection(repository, pipeline); } | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection... |
@Test public void testEntitiesWithValidArgument(){ Entity.ID newEntityID = Entity.ID.valueOf("urn:entity:" + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "." + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "/" + UUID.randomUUID()); GraphVisitor repository = new MockGraphVisitor(); GraphLookUpQuery graphLooku... | @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection(repository, pipeline); } | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entities(Entity.ID... entityIDs) { Preconditions.argumentNotNull(entityIDs, "entityIDs"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetBatchEntityByID(Arrays.asList(entityIDs))); return new GraphProjection... |
@Test public void testEntityWithNullInput(){ GraphVisitor repository = new MockGraphVisitor(); GraphLookUpQuery graphLookupQuery = new GraphLookUpQuery(repository); try{ graphLookupQuery.entity(null); fail("Should have thrown with null entities"); }catch(Exception e){ assertTrue(e instanceof IllegalArgumentException); ... | @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } } | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } Gra... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } Gra... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } Gra... |
@Test public void testEntityWithValidArgument(){ Entity.ID newEntityID = Entity.ID.valueOf("urn:entity:" + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "." + TartanImplTestConstants.ATTR_PARENT_ID.getName() + "/" + UUID.randomUUID()); GraphVisitor repository = new MockGraphVisitor(); GraphLookUpQuery graphLookupQ... | @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } } | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } Gra... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } Gra... | GraphLookUpQuery implements Queries.LookupQuery { @Override public Queries.Projection entity(Entity.ID entityID) { Preconditions.argumentNotNull(entityID, "entityID"); OperationPipeline pipeline = new OperationPipeline(); pipeline.add(new GetEntityByID(entityID)); return new GraphProjection(repository, pipeline); } Gra... |
@Test public void testFetchGraphValueChange(){ GraphVisitor repository = new MockGraphVisitor(); GraphLookUpQuery graphLookupQuery = new GraphLookUpQuery(repository); ValueSpecifier<Projection> projection = graphLookupQuery.entityBy(TartanImplTestConstants.ATTR_PARENT_ID); assertNotNull(projection); } | @Override public ValueSpecifier<Projection> entityBy(Name name) { return new GraphValueChange(name); } | GraphLookUpQuery implements Queries.LookupQuery { @Override public ValueSpecifier<Projection> entityBy(Name name) { return new GraphValueChange(name); } } | GraphLookUpQuery implements Queries.LookupQuery { @Override public ValueSpecifier<Projection> entityBy(Name name) { return new GraphValueChange(name); } GraphLookUpQuery(final GraphVisitor repository); } | GraphLookUpQuery implements Queries.LookupQuery { @Override public ValueSpecifier<Projection> entityBy(Name name) { return new GraphValueChange(name); } GraphLookUpQuery(final GraphVisitor repository); @Override Queries.Projection entities(Entity.ID... entityIDs); @Override Queries.Projection entity(Entity.ID entityID)... | GraphLookUpQuery implements Queries.LookupQuery { @Override public ValueSpecifier<Projection> entityBy(Name name) { return new GraphValueChange(name); } GraphLookUpQuery(final GraphVisitor repository); @Override Queries.Projection entities(Entity.ID... entityIDs); @Override Queries.Projection entity(Entity.ID entityID)... |
@Test public void testCreateGraphMutationResultWithEntityKeys(){ List<String> entityKeys = new ArrayList<String>(Arrays.asList("Key1", "Key2", "Key3")); GraphMutationResult graphMutationResult = new GraphMutationResult(entityKeys ); List<String> entityKeysReturned = graphMutationResult.getEntityKeys(); assertNotNull(en... | public List<String> getEntityKeys() { return entityKeys; } | GraphMutationResult implements BatchMutation.Result, VisitOperationResult { public List<String> getEntityKeys() { return entityKeys; } } | GraphMutationResult implements BatchMutation.Result, VisitOperationResult { public List<String> getEntityKeys() { return entityKeys; } GraphMutationResult(); GraphMutationResult(List<String> entityKeys); } | GraphMutationResult implements BatchMutation.Result, VisitOperationResult { public List<String> getEntityKeys() { return entityKeys; } GraphMutationResult(); GraphMutationResult(List<String> entityKeys); List<String> getEntityKeys(); } | GraphMutationResult implements BatchMutation.Result, VisitOperationResult { public List<String> getEntityKeys() { return entityKeys; } GraphMutationResult(); GraphMutationResult(List<String> entityKeys); List<String> getEntityKeys(); } |
@Test public void testStreamComparisonGreaterThan(){ try{ StreamPredicateBuilder pb = new StreamPredicateBuilder(); StreamComparison streamComparison = new StreamComparison(pb ); Object o = null; streamComparison.greaterThan(o); }catch(Exception e){ assertTrue(e instanceof UnsupportedOperationException); } } | @Override public StreamPredicateBuilder greaterThan(Object o) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } | StreamComparison implements Comparison { @Override public StreamPredicateBuilder greaterThan(Object o) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } } | StreamComparison implements Comparison { @Override public StreamPredicateBuilder greaterThan(Object o) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } StreamComparison(StreamPredicateBuilder pb); } | StreamComparison implements Comparison { @Override public StreamPredicateBuilder greaterThan(Object o) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } StreamComparison(StreamPredicateBuilder pb); StreamComparison get(Attribute.Name name); @Override StreamPredicateBuilder equalTo(Obje... | StreamComparison implements Comparison { @Override public StreamPredicateBuilder greaterThan(Object o) throws UnsupportedOperationException { throw new UnsupportedOperationException(); } StreamComparison(StreamPredicateBuilder pb); StreamComparison get(Attribute.Name name); @Override StreamPredicateBuilder equalTo(Obje... |
@Test public void testCreateGraphMutationResultWithoutKeys(){ GraphMutationResult graphMutationResult = new GraphMutationResult(); assertEquals(Collections.emptyList(), graphMutationResult.getEntityKeys()); } | public List<String> getEntityKeys() { return entityKeys; } | GraphMutationResult implements BatchMutation.Result, VisitOperationResult { public List<String> getEntityKeys() { return entityKeys; } } | GraphMutationResult implements BatchMutation.Result, VisitOperationResult { public List<String> getEntityKeys() { return entityKeys; } GraphMutationResult(); GraphMutationResult(List<String> entityKeys); } | GraphMutationResult implements BatchMutation.Result, VisitOperationResult { public List<String> getEntityKeys() { return entityKeys; } GraphMutationResult(); GraphMutationResult(List<String> entityKeys); List<String> getEntityKeys(); } | GraphMutationResult implements BatchMutation.Result, VisitOperationResult { public List<String> getEntityKeys() { return entityKeys; } GraphMutationResult(); GraphMutationResult(List<String> entityKeys); List<String> getEntityKeys(); } |
@Test public void testGraphAttributeOperationsCreationWithNullName(){ GraphAttributeOperations graphAttributeOperations = new GraphAttributeOperations(); Name name = null; String attributeOperationValue = "DummySetOperationValue1"; try{ graphAttributeOperations.setAttributeValue(name, attributeOperationValue); fail("Sh... | public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } } | GraphAttributeOperations { public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } } } | GraphAttributeOperations { public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } } GraphAttributeOperations(); } | GraphAttributeOperations { public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } } GraphAttributeOperations(); void setAttributeValue(Name name, Object value); void un... | GraphAttributeOperations { public void setAttributeValue(Name name, Object value) { if (value == null) { unsetAttributeValue(name); } else { Preconditions.argumentNotNull(name,"name::Atribute.Name"); setOperations.put(name, value); } } GraphAttributeOperations(); void setAttributeValue(Name name, Object value); void un... |
@Test public void testInit() { try { DSEPersistenceRepositoryProvider provider = new DSEPersistenceRepositoryProvider( new DSEConnectionManagerMock(new DSEConfigurationMock())); DSEGraphVisitor dseGraphVisitor = provider.get(); assertNotNull(dseGraphVisitor); } catch (Exception e) { fail("shouldn't have thrown"); } } | @Override public DSEGraphVisitor get() { return new DSEGraphVisitor(this.manager); } | DSEPersistenceRepositoryProvider implements Provider<DSEGraphVisitor> { @Override public DSEGraphVisitor get() { return new DSEGraphVisitor(this.manager); } } | DSEPersistenceRepositoryProvider implements Provider<DSEGraphVisitor> { @Override public DSEGraphVisitor get() { return new DSEGraphVisitor(this.manager); } @Inject DSEPersistenceRepositoryProvider(DSEConnectionManager manager); } | DSEPersistenceRepositoryProvider implements Provider<DSEGraphVisitor> { @Override public DSEGraphVisitor get() { return new DSEGraphVisitor(this.manager); } @Inject DSEPersistenceRepositoryProvider(DSEConnectionManager manager); @Override DSEGraphVisitor get(); } | DSEPersistenceRepositoryProvider implements Provider<DSEGraphVisitor> { @Override public DSEGraphVisitor get() { return new DSEGraphVisitor(this.manager); } @Inject DSEPersistenceRepositoryProvider(DSEConnectionManager manager); @Override DSEGraphVisitor get(); } |
@Test public void testCreateDSEMetadata(){ DSEMetadata<String> metadata = new DSEMetadata<>(String.class); assertEquals(metadata.getType(), String.class); } | public Class<T> getType() { return this.type; } | DSEMetadata implements Metadata { public Class<T> getType() { return this.type; } } | DSEMetadata implements Metadata { public Class<T> getType() { return this.type; } DSEMetadata(Class<T> type); } | DSEMetadata implements Metadata { public Class<T> getType() { return this.type; } DSEMetadata(Class<T> type); Class<T> getType(); } | DSEMetadata implements Metadata { public Class<T> getType() { return this.type; } DSEMetadata(Class<T> type); Class<T> getType(); } |
@Test public void testCreateEntity(){ } | public GraphMutationResult createEntity(NewEntity newEntity) { String entityId = newEntity.getEntityID().toString(); Map<Attribute.Name, Object> attributes = newEntity.getAttributes(); String entityProperty = attributes.entrySet().stream() .map(e -> String.format(GraphOperations.ENTITY_PROPERTY_FORMAT, e.getKey(), e.ge... | GraphEntityOperations extends GraphOperations { public GraphMutationResult createEntity(NewEntity newEntity) { String entityId = newEntity.getEntityID().toString(); Map<Attribute.Name, Object> attributes = newEntity.getAttributes(); String entityProperty = attributes.entrySet().stream() .map(e -> String.format(GraphOpe... | GraphEntityOperations extends GraphOperations { public GraphMutationResult createEntity(NewEntity newEntity) { String entityId = newEntity.getEntityID().toString(); Map<Attribute.Name, Object> attributes = newEntity.getAttributes(); String entityProperty = attributes.entrySet().stream() .map(e -> String.format(GraphOpe... | GraphEntityOperations extends GraphOperations { public GraphMutationResult createEntity(NewEntity newEntity) { String entityId = newEntity.getEntityID().toString(); Map<Attribute.Name, Object> attributes = newEntity.getAttributes(); String entityProperty = attributes.entrySet().stream() .map(e -> String.format(GraphOpe... | GraphEntityOperations extends GraphOperations { public GraphMutationResult createEntity(NewEntity newEntity) { String entityId = newEntity.getEntityID().toString(); Map<Attribute.Name, Object> attributes = newEntity.getAttributes(); String entityProperty = attributes.entrySet().stream() .map(e -> String.format(GraphOpe... |
@Test public void testGetStatement(){ DSEConfigurationMock config = new DSEConfigurationMock(); DSEConnectionManager dseConnectionManager = new DSEConnectionManager(config); SimpleGraphStatement statement = dseConnectionManager.getStatement("mock-command"); AssertJUnit.assertNotNull(statement); AssertJUnit.assertEquals... | public SimpleGraphStatement getStatement(String cmd) { SimpleGraphStatement sVertexStatement = new SimpleGraphStatement(cmd); sVertexStatement.setGraphName(config.getGraph()); return sVertexStatement; } | DSEConnectionManager { public SimpleGraphStatement getStatement(String cmd) { SimpleGraphStatement sVertexStatement = new SimpleGraphStatement(cmd); sVertexStatement.setGraphName(config.getGraph()); return sVertexStatement; } } | DSEConnectionManager { public SimpleGraphStatement getStatement(String cmd) { SimpleGraphStatement sVertexStatement = new SimpleGraphStatement(cmd); sVertexStatement.setGraphName(config.getGraph()); return sVertexStatement; } @Inject DSEConnectionManager(DSEPersistenceConfiguration config); } | DSEConnectionManager { public SimpleGraphStatement getStatement(String cmd) { SimpleGraphStatement sVertexStatement = new SimpleGraphStatement(cmd); sVertexStatement.setGraphName(config.getGraph()); return sVertexStatement; } @Inject DSEConnectionManager(DSEPersistenceConfiguration config); SimpleGraphStatement getSta... | DSEConnectionManager { public SimpleGraphStatement getStatement(String cmd) { SimpleGraphStatement sVertexStatement = new SimpleGraphStatement(cmd); sVertexStatement.setGraphName(config.getGraph()); return sVertexStatement; } @Inject DSEConnectionManager(DSEPersistenceConfiguration config); SimpleGraphStatement getSta... |
@Test public void testInitWithNullAttributeThrowsException(){ ID entityID = Entity.ID.valueOf("test-entity-id"); try{ NewEntity newEntity = NewEntity.newInstance(entityID) .withAttribute(null).value(true).build(); fail("Should throw an exception"); }catch(Exception ex){ assertTrue(ex instanceof IllegalArgumentException... | public static Builder newInstance(Entity.ID entityID) { return new Builder(entityID); } | NewEntity { public static Builder newInstance(Entity.ID entityID) { return new Builder(entityID); } } | NewEntity { public static Builder newInstance(Entity.ID entityID) { return new Builder(entityID); } private NewEntity(Entity.ID entityID); } | NewEntity { public static Builder newInstance(Entity.ID entityID) { return new Builder(entityID); } private NewEntity(Entity.ID entityID); static Builder newInstance(Entity.ID entityID); Map<Attribute.Name, Object> getAttributes(); Entity.ID getEntityID(); } | NewEntity { public static Builder newInstance(Entity.ID entityID) { return new Builder(entityID); } private NewEntity(Entity.ID entityID); static Builder newInstance(Entity.ID entityID); Map<Attribute.Name, Object> getAttributes(); Entity.ID getEntityID(); } |
@Test public void testInitWithNullInstanceName() { Entity.ID sourceId = Entity.ID.valueOf("test-source-id"); Entity.ID targetId = Entity.ID.valueOf("test-target-id"); Attribute.Name attributeName = Attribute.Name.valueOf("test-attribute-name"); try { NewRelationship relationship = NewRelationship.between(sourceId, targ... | public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); } | NewRelationship { public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); } } | NewRelationship { public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); } private NewRelationship(Entity.ID source, Entity.ID target); } | NewRelationship { public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); } private NewRelationship(Entity.ID source, Entity.ID target); Entity.ID getSourceID(); Entity.ID getTargetID(); Relationship.Name getName(); Map<Attribute.Name, Object> getAttributes(); sta... | NewRelationship { public static Builder between(Entity.ID sourceID, Entity.ID targetID) { return new Builder(sourceID,targetID); } private NewRelationship(Entity.ID source, Entity.ID target); Entity.ID getSourceID(); Entity.ID getTargetID(); Relationship.Name getName(); Map<Attribute.Name, Object> getAttributes(); sta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.