public void GetRulesRow_UnknownProcessPath() { var ruleset = new Ruleset(); var Rule = AddRule(ruleset, @"c:\test.txt", @"c:\knownproc.exe"); AdvAssert.ThrowsArgument(() => ruleset.GetRulesRow(Rule.PathID, @"c:\unknownn_process.exe"), "processPath"); }
public void GetRulesRow_UnknownPathID() { var ruleset = new Ruleset(); AddRule(ruleset, @"c:\test.txt", @"c:\knownproc.exe"); AdvAssert.ThrowsArgument(() => ruleset.GetRulesRow(333, @"c:\knownproc.exe"), "pathID"); }
public void Deserialize_WrongData() { var wrongData = new byte[450]; for (var i = 0; i < 450; i++) { wrongData[i] = (byte)i; } AdvAssert.ThrowsArgument(() => LogEntryData.Deserialize(new byte[] {}), "data"); }
public void SendCommand_DelValidPath() { driver.Start(); AdvAssert.ThrowsArgument(() => driver.SendCommand(COMMAND_TYPE.DEL, "C:\\test.txt", 0), "path"); }
public void SendCommand_DelEmptyPath() { driver.Start(); AdvAssert.ThrowsArgument(() => driver.SendCommand(COMMAND_TYPE.DEL, string.Empty, 0), "path"); }
public void SendCommand_AddNullPath() { driver.Start(); AdvAssert.ThrowsArgument(() => driver.SendCommand(COMMAND_TYPE.ADD, null, 0), "path"); }
public void Deserialize_EmptyArray() { AdvAssert.ThrowsArgument(() => LogEntryData.Deserialize(new byte[] {}), "data"); }