
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
ninja.abap:odata-mock-server
Advanced tools
Simple Java library for mocking OData V2 services.
It aims to provide similar functionality to the SAPUI5 Mock Server (used in Web applications development).
The OData service is served by a Jetty HTTP server, making it useful for unit/integration tests as well as running as a standalone service to be consumed by other applications.
Add this Maven dependency to your pom.xml:
<dependency>
<groupId>ninja.abap</groupId>
<artifactId>odata-mock-server</artifactId>
<version>1.0.2</version>
<scope>test</scope>
</dependency>
import ninja.abap.odatamock.server.ODataMockServer;
import ninja.abap.odatamock.server.ODataMockServerBuilder;
public class FooTest {
@Test
public void testOData {
ODataMockServer server = new ODataMockServerBuilder()
.edmxFromFile("src/test/resources/Northwind.svc.edmx")
.localDataPath("src/test/resources/mockdata")
.build();
server.getUri(); // returns URL to running server
// tell your application to fire requests at the OData service
server.stop();
}
}
Check out this library's own JUnit tests for examples on how to operate the server.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
FAQs
OData V2 service mocking library
We found that ninja.abap:odata-mock-server demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.