Ejemplo n.º 1
0
        void FromErrorThrows(String message, String paramName)
        {
            ITestEntry entry = default;

            TestX.If.Action.ThrowsException(() => entry = TestEntry.FromError(message), out ArgumentException argEx);
            TestX.If.Value.IsEqual(argEx.ParamName, paramName);
            TestX.If.Object.IsNull(entry);
        }
Ejemplo n.º 2
0
        void FromError(String message, EntryTypes expected_type, String expected_instruction, String expected_message)
        {
            ITestEntry entry = default;

            TestX.IfNot.Action.ThrowsException(() => entry = TestEntry.FromError(message), out Exception ex);

            TestX.IfNot.Object.IsNull(entry);
            TestX.If.Value.IsEqual(entry.EntryType, expected_type);
            TestX.If.Value.IsEqual(entry.Instruction, expected_instruction);
            TestX.If.Value.IsEqual(entry.Message, expected_message);
        }
Ejemplo n.º 3
0
 public void LogError(MethodInfo _method, String message) => AddEntry(TestEntry.FromError(message), _method.DeclaringType.Name, _method.Name);