public void InsertIconsFileWithIconNames() { string file = CompileAssembly(); int result = InsertIconsProgram.Main(new[] { file, @"Data\icons.txt" }); Assert.AreEqual(0, result); }
public void InsertIconsDirectoryOfIcons() { string file = CompileAssembly(); int result = InsertIconsProgram.Main(new[] { file, @"Data\icons" }); Assert.AreEqual(0, result); }
public void InsertIconsExplicitList() { string file = CompileAssembly(); int result = InsertIconsProgram.Main(new[] { file, @"Data\icons\cmd.ico;Data\icons\icon1.ico;Data\icons\sec.ico" }); Assert.AreEqual(0, result); }
public void InsertIconsFromStdInput() { string file = CompileAssembly(); Console.SetIn(new StringReader("Data\\icons\\icon1.ico\r\nData\\icons\\sec.ico")); int result = InsertIconsProgram.Main(new[] { file }); Assert.AreEqual(0, result); }
public void AssemblyThatWasntSignedBeforeThrowsErrorIfKeyIsPassedIn() { string file = CompileAssembly(false); bool wasVerified = false; bool isOK = StrongNameSignatureVerificationEx(file, true, ref wasVerified); Assert.IsFalse(wasVerified, "The file should not have been verified"); Assert.IsFalse(isOK, "Should have returned false, because the file is not signed"); Console.SetIn(new StringReader("Data\\icons\\icon1.ico\r\nData\\icons\\sec.ico")); int result = InsertIconsProgram.Main(new[] { file, @"Data\icons\cmd.ico;Data\icons\icon1.ico;Data\icons\sec.ico", @"Data\TestApp.snk" }); Assert.AreEqual(1, result); }
public void ResignAssembliesWithStrongNameKey() { string file = CompileAssembly(); bool wasVerified = false; bool isOK = StrongNameSignatureVerificationEx(file, true, ref wasVerified); Assert.IsTrue(wasVerified, "The file should have been verified"); Assert.IsTrue(isOK, "Signature should be ok before adding icons"); Console.SetIn(new StringReader("Data\\icons\\icon1.ico\r\nData\\icons\\sec.ico")); int result = InsertIconsProgram.Main(new[] { file, @"Data\icons\cmd.ico;Data\icons\icon1.ico;Data\icons\sec.ico", @"Data\TestApp.snk" }); Assert.AreEqual(0, result); isOK = StrongNameSignatureVerificationEx(file, true, ref wasVerified); Assert.IsTrue(wasVerified, "The file should have been verified"); Assert.IsTrue(isOK, "Signature should be ok after adding icons"); }