Exemplo n.º 1
0
            public void Should_remove_cruise_server()
            {
                var model   = new MasterModel();
                var server1 = model.CreateCruiseServer(x => { x.Url = "http://www.example.com/1"; x.Name = "1"; });
                var server2 = model.CreateCruiseServer(x => { x.Url = "http://www.example.com/2"; x.Name = "2"; });
                var server3 = model.CreateCruiseServer(x => { x.Url = "http://www.example.com/3"; x.Name = "3"; });

                model.RemoveCruiseServer(server2.Id);

                model.CruiseServers.Length.ShouldEqual(2);
                model.CruiseServers.Count(x => x.Id.Equals(server1.Id)).ShouldEqual(1);
                model.CruiseServers.Count(x => x.Id.Equals(server3.Id)).ShouldEqual(1);
            }