Example #1
0
        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");
        }
Example #2
0
        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");
        }
Example #3
0
        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");
        }
Example #4
0
 public void SendCommand_DelValidPath()
 {
     driver.Start();
     AdvAssert.ThrowsArgument(() => driver.SendCommand(COMMAND_TYPE.DEL, "C:\\test.txt", 0), "path");
 }
Example #5
0
 public void SendCommand_DelEmptyPath()
 {
     driver.Start();
     AdvAssert.ThrowsArgument(() => driver.SendCommand(COMMAND_TYPE.DEL, string.Empty, 0), "path");
 }
Example #6
0
        public void SendCommand_AddNullPath()
        {
            driver.Start();

            AdvAssert.ThrowsArgument(() => driver.SendCommand(COMMAND_TYPE.ADD, null, 0), "path");
        }
Example #7
0
 public void Deserialize_EmptyArray()
 {
     AdvAssert.ThrowsArgument(() => LogEntryData.Deserialize(new byte[] {}), "data");
 }