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); }
public void TheAllowedValuesForANonEnumTypeAreUndefined() { var allowed = AppMetadataReader.TryGetAllowedValues(typeof(string)); Assert.Null(allowed); }
public void TheAllowedValuesForAnEnumTypeAreAllNames() { var allowed = AppMetadataReader.TryGetAllowedValues(typeof(Test)); Assert.Equal(3, allowed.Length);
public void TheDefaultSettingTypeForAnEnumIsSelect() { var settingType = AppMetadataReader.GetSettingType(typeof(Test)); Assert.Equal(AppSettingType.Select, settingType); }