/**
 * Copyright 2009-2019 the original author or authors.
 *
 * 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.javacrumbs.jsonunit.test.moshi;

import net.javacrumbs.jsonunit.test.base.AbstractAssertJTest;
import org.junit.jupiter.api.Test;

import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;
import static net.javacrumbs.jsonunit.test.base.JsonTestUtils.readByMoshi;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

public class MoshiAssertJTest extends AbstractAssertJTest {

    @Override
    protected Object readValue(String value) {
            return readByMoshi(value);
        }

    @Test
    void shouldAssertInteger() {
        assertThatThrownBy(() -> assertThatJson("{\"a\":1}").node("a").isIntegralNumber())
            .isInstanceOf(UnsupportedOperationException.class);
    }

    @Test
    void shouldAssertIntegerFailure() {
        assertThatThrownBy(() -> assertThatJson("{\"a\":1.0}").node("a").isIntegralNumber())
            .isInstanceOf(UnsupportedOperationException.class);
    }

    @Test
    @Override
    protected void testNotEqualTo() {
        assertThatThrownBy(() -> assertThatJson("{\"test\":1}").isNotEqualTo("{\"test\": \"${json-unit.any-number}\"}"))
            .hasMessage("\n" +
                "Expecting:\n" +
                " <[{\"test\": 1}]>\n" + //FIXME
                "not to be equal to:\n" +
                " <\"{\"test\": \"${json-unit.any-number}\"}\">\n" +
                "when comparing values using JsonComparator");

    }

    @Test
    @Override
    protected void shouldEqualNumberInObject() {
        // ignored, no support of object serialization neither
    }
}

@@ -1572,486 +1572,8 @@
  %7D%0A%0A
-    @Test%0A    @Override%0A    protected void testNotEqualTo() %7B%0A        assertThatThrownBy(() -%3E assertThatJson(%22%7B%5C%22test%5C%22:1%7D%22).isNotEqualTo(%22%7B%5C%22test%5C%22: %5C%22$%7Bjson-unit.any-number%7D%5C%22%7D%22))%0A            .hasMessage(%22%5Cn%22 +%0A                %22Expecting:%5Cn%22 +%0A                %22 %3C%5B%7B%5C%22test%5C%22: 1%7D%5D%3E%5Cn%22 + //FIXME%0A                %22not to be equal to:%5Cn%22 +%0A                %22 %3C%5C%22%7B%5C%22test%5C%22: %5C%22$%7Bjson-unit.any-number%7D%5C%22%7D%5C%22%3E%5Cn%22 +%0A                %22when comparing values using JsonComparator%22);%0A%0A    %7D%0A%0A
     

Update to AssertJ 3.18.0