public static List <Standards> GetAllStandards(ISyncPolicyFactory _policy) { var stdsDatastore = new StandardsDatastore(DatastoreBaseSetup.StandardsDatastore, new Mock <ILogger <StandardsDatastore> >().Object, _policy, _config, new Mock <ILongTermCache>().Object); var allStds = stdsDatastore.GetAll().ToList(); return(allStds); }
public void ByStandard_KnownIds_ReturnsData() { var stdsDatastore = new StandardsDatastore(DatastoreBaseSetup.StandardsDatastore, new Mock <ILogger <StandardsDatastore> >().Object, _policy, _config, new Mock <ILongTermCache>().Object); var stds = stdsDatastore.GetAll().ToList(); var datastore = new CapabilitiesDatastore(DatastoreBaseSetup.CapabilitiesDatastore, _logger, _policy, _config, new Mock <ILongTermCache>().Object); var datas = stds.SelectMany(std => datastore.ByStandard(std.Id, true)).ToList(); datas.Should().NotBeEmpty(); datas.ForEach(data => data.Should().NotBeNull()); datas.ForEach(data => Verifier.Verify(data)); }