use of com.artipie.asto.memory.InMemoryStorage in project maven-adapter by artipie.
the class UploadSliceTest method init.
@BeforeEach
void init() {
this.asto = new InMemoryStorage();
this.ums = new UploadSlice(this.asto);
}
use of com.artipie.asto.memory.InMemoryStorage in project maven-adapter by artipie.
the class ArtifactsMetadataTest method initiate.
@BeforeEach
void initiate() {
this.storage = new InMemoryStorage();
this.key = new Key.From("com/test/logger");
}
use of com.artipie.asto.memory.InMemoryStorage in project front by artipie.
the class GetRepositoryPermissionsTest method init.
@BeforeEach
void init() {
this.blsto = new BlockingStorage(new InMemoryStorage());
this.snt = new RepoSettings("flat", this.blsto);
}
use of com.artipie.asto.memory.InMemoryStorage in project front by artipie.
the class GetRepositoryTest method returnsRepositorySettings.
@ParameterizedTest
@CsvSource({ "yaml,my-maven", "yml,my-npm-proxy" })
void returnsRepositorySettings(final String ext, final String name) throws Exception {
final BlockingStorage blsto = new BlockingStorage(new InMemoryStorage());
final String file = String.format("%s.%s", name, ext);
blsto.save(new Key.From(file), new TestResource(String.format("GetRepositoryTest/%s", file)).asBytes());
final var resp = Mockito.mock(Response.class);
final var rqs = Mockito.mock(Request.class);
Mockito.when(rqs.params(GetRepository.NAME_PARAM.toString())).thenReturn(name);
Mockito.when(rqs.attribute(RequestAttr.Standard.USER_ID.attrName())).thenReturn("any");
JSONAssert.assertEquals(new GetRepository(new RepoSettings("flat", blsto)).handle(rqs, resp), new String(new TestResource(String.format("GetRepositoryTest/%s.json", name)).asBytes(), StandardCharsets.UTF_8), true);
Mockito.verify(resp).type("application/json");
}
use of com.artipie.asto.memory.InMemoryStorage in project front by artipie.
the class PutUserTest method init.
@BeforeEach
void init() {
this.asto = new BlockingStorage(new InMemoryStorage());
this.users = new YamlUsers(PutUserTest.CREDS_YAML, this.asto);
}
Aggregations