public GeneratorConfiguration() { Version = new GeneratorVersion("1.0.0"); OutputPath = Path.Combine("repos", "RCMS"); // must be in this order as settings file depends on default values of preceeding variables if invalid LocalFolder = DefaultlocalFolder; Target = Targets.Default; SettingsFile = DefaultSettingFile; }
public void FileHelper_GetAbbreviatedFileName_ReturnsExpected(string filePath, string expectedFilename, string version) { var f = FileHelper.GetAbbreviatedFilename(filePath); GeneratorVersion expectedVersion; if (version == null) { expectedVersion = null; } else if (version == string.Empty) { expectedVersion = new GeneratorVersion(); } else { expectedVersion = new GeneratorVersion(version); } f.filename.Should().Be(expectedFilename); f.version.Should().BeEquivalentTo(expectedVersion); }
protected MetadataBase() { var vers = GetType().Assembly.GetCustomAttribute <AssemblyInformationalVersionAttribute>()?.InformationalVersion; Version = new GeneratorVersion(vers); }
protected MetadataBase(string vers) { Version = new GeneratorVersion(vers); }