Exemple #1
0
        public void FindsAppConfiguration()
        {
            const string appBinaries = "Apps/FirstOfTypeBinaries";

            Assert.True(Directory.Exists(appBinaries));

            using var loader = new AppLoader(appBinaries);
            Assert.True(loader.TryLoadSeqAppType(null, out var seqAppType));

            var definition = AppMetadataReader.ReadFromSeqAppType(seqAppType);

            Assert.Equal("First of Type", definition.Name);

            var typeName = definition.Platform["hosted-dotnet"].SeqAppTypeName;

            Assert.Equal("Seq.App.FirstOfType.FirstOfTypeDetector", typeName);
        }
Exemple #2
0
        public void TheAllowedValuesForANonEnumTypeAreUndefined()
        {
            var allowed = AppMetadataReader.TryGetAllowedValues(typeof(string));

            Assert.Null(allowed);
        }
Exemple #3
0
        public void TheAllowedValuesForAnEnumTypeAreAllNames()
        {
            var allowed = AppMetadataReader.TryGetAllowedValues(typeof(Test));

            Assert.Equal(3, allowed.Length);
Exemple #4
0
        public void TheDefaultSettingTypeForAnEnumIsSelect()
        {
            var settingType = AppMetadataReader.GetSettingType(typeof(Test));

            Assert.Equal(AppSettingType.Select, settingType);
        }