Skip to content
Snippets Groups Projects
Select Git revision
  • 6f6c4d06e5952e88198099f15d3fee1458cebe50
  • master default protected
  • dev_2022
  • patch-1
  • develop
  • 50-use-ubuntus-libhidapi
  • issue-highLevelDispatch
  • issue-highLevelDesign
  • issue-motorStartBug
  • issue-commandLayerDesign
  • v1.0
  • v0.4-rc.13
  • v0.4-rc.12
  • v0.4-rc.11
  • v0.4-rc.10
  • v0.4-rc.9
  • v0.3-rc.8
  • v0.3-rc.7
  • v0.3-rc.6
  • v0.3-rc.5
  • v0.3-rc.4
  • v0.3-rc.3
  • v0.3-rc.2
  • v0.3-rc.1
  • v0.3-rc
  • v0.2
  • v0.1.1
  • v0.1
28 results

conf.py

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ModelTests.cs 2.00 KiB
    using NUnit.Framework;
    using System;
    
    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);
            }
        }
    }