All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.siwenyan.si.SiCommandExecutorAssert Maven / Gradle / Ivy

There is a newer version: 1.25.1.0
Show newest version
package com.github.siwenyan.si;

class SiCommandExecutorAssert extends SiCommandExecutor {

    @Override
    public void execute(SiCommand command, SiContext siContext) throws SiVerifyException {
        String varName = command.getSiModelCommand().getTarget();
        String expected = command.getSiModelCommand().getValue();
        expected = siContext.dynamic(expected, "", "");

        String actual = siContext.getVarValue(varName);

        if (!actual.equals(expected)) {
            throw new SiVerifyException(
                    "Assert fail:\r\n" +
                            "\tExpected: [" + expected + "]\r\n" +
                            "\tActual: [" + actual + "]");
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy