public void PropertySettersMinimalTest() { var operation = new DeleteQueueOperation() .SetName("bar"); Assert.AreEqual("bar", operation.Name); Assert.IsFalse(operation.IfEmpty); Assert.IsFalse(operation.IfUnused); }
public DeleteQueueOperation DeleteQueue(string name) { var deleteQueueOperation = new DeleteQueueOperation() .SetName(name); Operations.Add(deleteQueueOperation); return(deleteQueueOperation); }
public void PropertySettersFullTest() { var operation = new DeleteQueueOperation() .SetName("bar") .SetIfEmpty(true) .SetIfUnused(true); Assert.AreEqual("bar", operation.Name); Assert.IsTrue(operation.IfEmpty); Assert.IsTrue(operation.IfUnused); }
public void ExecuteTest() { var addOperation = new AddQueueOperation() .SetName("bar"); var delOperation = new DeleteQueueOperation() .SetName("bar"); var server = new RabbitServer(); var connectionFactory = new FakeConnectionFactory(server); using (var connection = connectionFactory.CreateConnection()) { addOperation.Execute(connection, string.Empty); delOperation.Execute(connection, string.Empty); } Assert.AreEqual(0, server.Queues.Count); }