Skip to content
Snippets Groups Projects
Select Git revision
  • 88576925734d841c76da91553e9338cf3bb0c0c9
  • master default protected
  • develop protected
  • big_2017_api_change
  • VA_v2024a
  • VA_v2023b
  • VA_v2023a
  • before_VANet_update
  • VA_v2022a
  • before_cmake_rework
  • v2021.a
  • v2020.a
  • v2019.a
  • v2018.b
  • v2017.c
  • v2017.a
  • v2016.a
17 results

VAMatlabExecutable.cpp

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ModelTests.cs 2.06 KiB
    using Coscine.Database.Models;
    using NUnit.Framework;
    using System;
    using System.Collections.Generic;
    
    namespace Coscine.Database.Tests
    {
        [TestFixture]
        public class ModelTests
        {
            private static string _databaseName;
            //    private IConfiguration _configuration;
            //    private static Guid _userId;
    
            //    [OneTimeSetUp]
            //    public void OneTimeSetUp()
            //    {
            //        // Collect the DatabaseName from the Script $env:DatabaseName=
            //        _databaseName = Environment.GetEnvironmentVariable("DatabaseName");
            //        _configuration = new ConsulConfiguration();
            //        DatabaseSettingsConfiguration settingsConfiguration = new DatabaseSettingsConfiguration(_configuration);
            //        settingsConfiguration.DatabaseName = _databaseName;
            //        CoscineDB.DatabaseSettingsConfiguration = settingsConfiguration;
            //    }
    
            //    [Test]
            //    public void TestRead()
            //    {
            //        // HOW TO EXECUTE SECOND?
            //        var abc = new UserModel().GetAll();
            //    }
    
            //    [Test]
            //    public void TestAdd()
            //    {
            //        // HOW TO EXECUTE FIRST?
            //        User testUser = new User()
            //        {
            //            Id = Guid.NewGuid(),
            //            DisplayName = "EF_TEST_DISPLAY_NAME",
            //            Givenname = "EF_TEST_GIVEN_NAME",
            //            Surname = "EF_TEST_SURNAME"
            //        };
            //        UserModel testUserModel = new UserModel();
            //        testUserModel.Insert(testUser);
            //        _userId = testUser.Id;
            //    }
    
            //    [Test]
            //    public void TestRemove()
            //    {
            //        // EXECUTE LAST; Delete created Test User in TestAdd().
            //    }
            //}
            [Test]
            public void TestCollectFromEnvironment()
            {
                _databaseName = Environment.GetEnvironmentVariable("DatabaseName");
                Assert.True(_databaseName.Length > 0);
            }
        }
    }