public async Task PassesOutputToRunLoadOrderPreparer( IGroupRun groupRun, IReadOnlySet <ModKey> blacklist, GroupRunPreparer sut) { await sut.Prepare(groupRun, blacklist); sut.GroupRunLoadOrderPreparer.Received(1).Write(groupRun, blacklist); }
public async Task PassesPersistenceToPersister( IGroupRun groupRun, PersistenceMode persistenceMode, IReadOnlySet <ModKey> blacklist, string?persistencePath, GroupRunPreparer sut) { await sut.Prepare(groupRun, blacklist, persistenceMode, persistencePath); sut.PersistencePreparer.Received(1).Prepare(persistenceMode, persistencePath); }
public async Task ThrowingPersistencePrepareStillRunsLoadOrderPrepare( IGroupRun groupRun, PersistenceMode persistenceMode, IReadOnlySet <ModKey> blacklist, string?persistencePath, GroupRunPreparer sut) { sut.PersistencePreparer.When(x => x.Prepare(Arg.Any <PersistenceMode>(), Arg.Any <string?>())) .Do(_ => throw new NotImplementedException()); await Assert.ThrowsAsync <NotImplementedException>(async() => { await sut.Prepare(groupRun, blacklist, persistenceMode, persistencePath); }); sut.GroupRunLoadOrderPreparer.Received(1).Write(groupRun, blacklist); }