コード例 #1
0
        public async Task PassesOutputToRunLoadOrderPreparer(
            IGroupRun groupRun,
            IReadOnlySet <ModKey> blacklist,
            GroupRunPreparer sut)
        {
            await sut.Prepare(groupRun, blacklist);

            sut.GroupRunLoadOrderPreparer.Received(1).Write(groupRun, blacklist);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }