예제 #1
0
        // TODO: test with errors / loading / conflicts
        private CalculatedRepositoryStateEnum CalculateState(params IModelRepositoryMod[] mods)
        {
            var repo = new Mock <IModelRepository>(MockBehavior.Strict);

            repo.Setup(r => r.State).Returns(LoadingState.Loaded);
            repo.Setup(r => r.GetMods()).Returns(mods.ToList());
            return(CoreCalculation.GetRepositoryState(repo.Object, mods.ToList()));
        }
예제 #2
0
 public CalculatedRepositoryStateEnum GetStateFor(IModelRepository repository)
 {
     _model ??= _serviceProvider.Get <IModel>();
     return(CoreCalculation.GetRepositoryState(repository, _model.GetRepositoryMods()));
 }