protected void Assert_of_operation(int log_index, SenderMock.Operation operation, Type type, string url_part = null) { SenderLog log = _sender.Log[log_index]; //Assert.AreEqual(operation, log.Operation, " (" + log_index.ToString() + ") " + log.Request?.GetType().Name + " - " + log.Url); //Assert.AreEqual(type, log.Request?.GetType(), " (" + log_index.ToString() + ") " + log.Operation.ToString() + " - " + log.Url); Assert.AreEqual(operation + " " + type?.Name, log.Operation + " " + log.Request?.GetType()?.Name, " (" + log_index.ToString() + ") " + log.Url); if (url_part != null) { Assert.IsTrue(log.Url.Contains(url_part), " (" + log_index.ToString() + ") " + log.Request?.GetType().Name + " - " + log.Operation.ToString()); } }
public SenderLog(SenderMock.Operation operation, string url, object request) { Operation = operation; Url = url; Request = request; }