Beispiel #1
0
        public void TestMethod1()
        {
            IRaceRegDB testDB = new TestDatabase();

            Affiliations = new ObservableCollection <Affiliation>(testDB.RefreshAffiliations().Result);

            string result = "";

            for (int i = 0; i < Affiliations.Count; i++)
            {
                result += Affiliations[i].Abbreviation + "\n";
            }

            Assert.AreEqual("abc\nabc\nabc\nabc\nabc\nabc\n", result);
        }
Beispiel #2
0
 public void Setup()
 {
     TestDatabase = new TestDatabase();
     Context      = new AppDbContext(TestDatabase.ContextOptions);
     Context.AddTestData();
     CS = new CoordinationService(
         new CoordinationRepository(Context),
         new NotificationService(new NotificationRepository(Context), new UnitOfWork(Context)),
         new PublisherRepository(Context),
         new CategoryRepository(Context),
         new TagsRepository(Context),
         new UnitOfWork(Context),
         new GitlabService(new DatasetServiceTests.SoullessGitlabCLient(), new Microsoft.Extensions.Configuration.ConfigurationBuilder().Build()));
     ExampleV = new Coordination
     {
         Id                = 103,
         Title             = "Samordning av museumsdata",
         Description       = "Dette er en samordning av data rundt museumer i kommunene: Bodø og Trondheim",
         PublisherId       = 100,
         CategoryId        = 100,
         UnderCoordination = false
     };
 }
Beispiel #3
0
 public TestTable(TestDatabase database, string tableColumnSchema)
 {
     _database          = database;
     _tableColumnSchema = tableColumnSchema;
 }