Skip to content
Snippets Groups Projects
Select Git revision
  • dev
  • master default protected
  • gitkeep
  • Issue/2353-dropShapeFix
  • Issue/2583-treeBug
  • Hotfix/2562-organizations
  • Issue/2464-invalidateMeta
  • Issue/2484-filterExtracted
  • Issue/2309-docs
  • Issue/2462-removeTraces
  • Hotfix/2459-EncodingPath
  • Hotfix/2452-linkedDeletion
  • Issue/2328-noFailOnLog
  • Issue/1792-newMetadataStructure
  • v2.5.2-Hotfix2365
  • Hotfix/2365-targetClassWorks
  • Issue/2269-niceKpiParser
  • Issue/2295-singleOrganizationFix
  • Issue/1953-owlImports
  • Hotfix/2087-efNet6
  • v2.9.0
  • v2.8.2
  • v2.8.1
  • v2.8.0
  • v2.7.2
  • v2.7.1
  • v2.7.0
  • v2.6.2
  • v2.6.1
  • v2.6.0
  • v2.5.3
  • v2.5.2
  • v2.5.1
  • v2.5.0
  • v2.4.1
  • v2.4.0
  • v2.3.0
  • v2.2.0
  • v2.1.0
  • v2.0.0
40 results

CoscineLDPHelper.cs

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);
            }
        }
    }