Prune the tests that shouldn't exist

This commit is contained in:
i509VCB 2020-06-16 01:00:04 -05:00
parent b226b21df1
commit a5112223ca
3 changed files with 0 additions and 68 deletions
fabric-lifecycle-events-v1/src/testmod
java/net/fabricmc/fabric/test/event/lifecycle
resources

View file

@ -1,32 +0,0 @@
/*
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
*
* Licensed 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.
*/
package net.fabricmc.fabric.test.event.lifecycle;
import net.fabricmc.api.DedicatedServerModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
public class DedicatedServerLifecycleTests implements DedicatedServerModInitializer {
@Override
public void onInitializeServer() {
if (!ServerLifecycleEvents.isPrimaryServerAvailable()) {
throw new AssertionError("Server should be available always on a dedicated server");
}
// Should throw no exceptions
ServerLifecycleEvents.getPrimaryServer();
}
}

View file

@ -1,32 +0,0 @@
/*
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
*
* Licensed 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.
*/
package net.fabricmc.fabric.test.event.lifecycle.client;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
public class IntegratedServerLifecycleTests implements ClientModInitializer {
@Override
public void onInitializeClient() {
// This should throw an illegal state exception, if it throws anything else, something is wrong. Should not return null since the supplier is setup in the api's ctor.
try {
ServerLifecycleEvents.getPrimaryServer();
} catch (IllegalStateException ignored) {
// Do nothing, this is intended
}
}
}

View file

@ -20,10 +20,6 @@
"net.fabricmc.fabric.test.event.lifecycle.client.ClientEntityLifecycleTests",
"net.fabricmc.fabric.test.event.lifecycle.client.ClientLifecycleTests",
"net.fabricmc.fabric.test.event.lifecycle.client.ClientTickTests",
"net.fabricmc.fabric.test.event.lifecycle.client.IntegratedServerLifecycleTests"
],
"server": [
"net.fabricmc.fabric.test.event.lifecycle.DedicatedServerLifecycleTests"
]
}
}