package cz.moneta.test.dsl.demo;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.endpoints.demo.DemoEndpoint;

public class Spirits {

    private final Harness harness;

    public Spirits(Harness harness) {
        this.harness = harness;
    }

    public SpiritRef summonSpirit(String name) {
        harness.getEndpoint(DemoEndpoint.class).summonSpirit(name);
        return new SpiritRef(name);
    }

    public Spirits expel(SpiritRef ref) {
        harness.getEndpoint(DemoEndpoint.class).expelSpirit(ref.getName());
        return this;
    }

    public SpiritVerifier verify() {
        return new SpiritVerifier(harness.getEndpoint(DemoEndpoint.class));
    }
}
