public void UpdateFiresPropertyChangedWhenMessageIsRemoved()
        {
            mocks = new MockRepository();
            var client = mocks.DynamicMock<CruiseServerClientBase>();
            var server = InitialiseServer();
            var status = new QueueSnapshot
            {
                Requests = {
                        new QueuedRequestSnapshot{
                            ProjectName = "Project 1"
                        },
                        new QueuedRequestSnapshot{
                            ProjectName = "Project 2"
                        }
                    }
            };
            var queue = new BuildQueue(client, server, status);
            mocks.ReplayAll();
            var eventFired = false;
            queue.Update(status);

            var newStatus = new QueueSnapshot
            {
                Requests = {
                        new QueuedRequestSnapshot{
                            ProjectName = "Project 2"
                        }
                    }
            };
            queue.BuildQueueRequestRemoved += (o, e) =>
            {
                eventFired = true;
            };
            queue.Update(newStatus);
            Assert.IsTrue(eventFired, "BuildQueueRequestRemoved for Requests change not fired");
        }
 public void UpdateValidatesArguments()
 {
     var client = mocks.DynamicMock<CruiseServerClientBase>();
     var server = InitialiseServer();
     var status = new QueueSnapshot { QueueName = "Testing" };
     var queue = new BuildQueue(client, server, status);
     mocks.ReplayAll();
     try
     {
         queue.Update(null);
         Assert.Fail("ArgumentNullException was expected");
     }
     catch (ArgumentNullException) { }
 }