public void ParsesRunningContainers_NoRunningContainers_ExpectedResults()
        {
            string           json   = String.Empty;
            List <Container> result = RunningContainersController.ParsesRunningContainers(json);

            result.ShouldBeNull();
        }
        public void SingleResulter_PortForwarded_GetsOnlyPortNotIP()
        {
            string withIPAndPortString = @"name:loving_lamarr,ports:0.0.0.0:80->80/tcp,image:ninja";

            var result = RunningContainersController.ParsesRunningContainers(withIPAndPortString);

            result.First().Ports.ShouldBe("80->80/tcp");
        }
        public void ParsesRunningContainers_TwoRunningContainers_ExpectedNameAndImage()
        {
            string json =
                @"name:competent_haibt,ports:80/tcp,image:nginx
                   name:loving_lamarr,ports:0.0.0.0:80->80/tcp,image:ninja";
            List <Container> result = RunningContainersController.ParsesRunningContainers(json);

            result.Count.ShouldBe(2);
            result.First().Names.ShouldBe("competent_haibt");
            result.ElementAt(1).Image.ShouldBe("ninja");
        }
        public void ParsesRunningContainers_OneRunningContainer_ExpectedNameAndImage()
        {
            var json = "name:fervent_nobel,ports:80/tcp,image:nginx";
            // {"Image":"nginx","Names":"fervent_nobel","Ports":"80/tcp"}
            // name:fervent_nobel,ports:80/tcp,image:nginx

            var result = RunningContainersController.ParsesRunningContainers(json);

            result.First().Image.ShouldBe("nginx");
            result.First().Names.ShouldBe("fervent_nobel");
            result.First().Ports.ShouldBe("80/tcp");
        }