public void LowerSymbolOneYear() { CopyrightInfo copyright = new CopyrightInfo(false, "Authors, Inc.", 2007); Assert.AreEqual("Copyright (c) 2007 Authors, Inc.", copyright.ToString()); }
public void UpperSymbolTwoConsecutiveYears() { CopyrightInfo copyright = new CopyrightInfo(true, "X & Y Group", 2006, 2007); Assert.AreEqual("Copyright (C) 2006, 2007 X & Y Group", copyright.ToString()); }
public void Should_not_grow_when_converted_to_string() { var info = new CopyrightInfo("ManOnTheMoon, Inc.", 2019); for (int i = 0; i < 10; i++) { info.ToString().Length.Should().Be(37); } }
public void Should_not_grow_when_converted_to_string() { var info = new CopyrightInfo ("ManOnTheMoon, Inc.", 2019); for (int i=0; i<10; i++) { info.ToString().Length.Should().Be(37); } }
public void ShouldNotGrowWhenConvertedToString() { var info = new CopyrightInfo ("ManOnTheMoon, Inc.", 2019); for (int i=0; i<10; i++) { info.ToString().Length.Should().Equal(37); } }
static void Main(string[] args) { var ass = Assembly.GetExecutingAssembly(); var fvi = FileVersionInfo.GetVersionInfo(ass.Location); var Heading = new HeadingInfo(fvi.FileDescription, ass.GetName().Version.ToString()); var Copyright = new CopyrightInfo(fvi.CompanyName, DateTime.Today.Year); Parser.Default.ParseArguments <Options>(args).WithParsed(o => { Console.WriteLine(Heading.ToString()); Console.WriteLine(Copyright.ToString()); Console.WriteLine(); if (!string.IsNullOrEmpty(o.Excludelist) && File.Exists(o.Excludelist)) { partitions = new List <string>(File.ReadAllLines(o.Excludelist)).ToArray(); } ulong eMMCDumpSize; ulong SectorSize = 0x200; if (o.ImgFile.ToLower().Contains(@"\\.\physicaldrive")) { Logging.Log("Tool is running in Device Dump mode."); Logging.Log("Gathering disk geometry..."); eMMCDumpSize = (ulong)GetDiskSize.GetDiskLength(@"\\.\PhysicalDrive" + o.ImgFile.ToLower().Replace(@"\\.\physicaldrive", "")); SectorSize = (ulong)GetDiskSize.GetDiskSectorSize(@"\\.\PhysicalDrive" + o.ImgFile.ToLower().Replace(@"\\.\physicaldrive", "")); } else { Logging.Log("Tool is running in Image Dump mode."); Logging.Log("Gathering disk image geometry..."); eMMCDumpSize = (ulong)new FileInfo(o.ImgFile).Length; } Logging.Log("Reported source device eMMC size is: " + eMMCDumpSize + " bytes - " + eMMCDumpSize / 1024 / 1024 + "MB - " + eMMCDumpSize / 1024 / 1024 / 1024 + "GB."); Logging.Log("Selected " + SectorSize + "B for the sector size"); ConvertDD2VHD(o.ImgFile, o.VhdFile, partitions, o.Recovery, (int)SectorSize); }); }
public void DefaultSymbolSeveralYears() { var copyright = new CopyrightInfo("CommandLine, Ltd", 1999, 2003, 2004, 2007); Assert.AreEqual("Copyright (C) 1999 - 2003, 2004 - 2007 CommandLine, Ltd", copyright.ToString()); }
public void Default_symbol_several_years() { var copyright = new CopyrightInfo("CommandLine, Ltd", 1999, 2003, 2004, 2007); copyright.ToString().Should().Be("Copyright (C) 1999 - 2003, 2004 - 2007 CommandLine, Ltd"); }
public void UpperSymbolTwoConsecutiveYears() { var copyright = new CopyrightInfo(true, "X & Y Group", 2006, 2007); Assert.AreEqual("Copyright (C) 2006, 2007 X & Y Group", copyright.ToString()); }
public void DefaultSymbolTwoNonConsecutiveYears() { var copyright = new CopyrightInfo("W & Z, Inc.", 2005, 2007); Assert.AreEqual("Copyright (C) 2005 - 2007 W & Z, Inc.", copyright.ToString()); }
public void Upper_symbol_two_consecutive_years() { var copyright = new CopyrightInfo(true, "X & Y Group", 2006, 2007); copyright.ToString().Should().Be("Copyright (C) 2006, 2007 X & Y Group"); }
public void LowerSymbolOneYear() { var copyright = new CopyrightInfo(false, "Authors, Inc.", 2007); Assert.AreEqual("Copyright (c) 2007 Authors, Inc.", copyright.ToString()); }
public void Lower_symbol_one_year() { var copyright = new CopyrightInfo(false, "Authors, Inc.", 2007); copyright.ToString().Should().Be("Copyright (c) 2007 Authors, Inc."); }
public void Default_symbol_two_non_consecutive_years() { var copyright = new CopyrightInfo("W & Z, Inc.", 2005, 2007); copyright.ToString().Should().Be("Copyright (C) 2005 - 2007 W & Z, Inc."); }
public void UpperSymbolTwoConsecutiveYears() { var copyright = new CopyrightInfo(true, "X & Y Group", 2006, 2007); copyright.ToString().Should().Equal("Copyright (C) 2006, 2007 X & Y Group"); }
public void DefaultSymbolTwoNonConsecutiveYears() { var copyright = new CopyrightInfo("W & Z, Inc.", 2005, 2007); copyright.ToString().Should().Equal("Copyright (C) 2005 - 2007 W & Z, Inc."); }
public void LowerSymbolOneYear() { var copyright = new CopyrightInfo(false, "Authors, Inc.", 2007); copyright.ToString().Should().Equal("Copyright (c) 2007 Authors, Inc."); }