public void EmptyNameTest()
        {
            var cruiser = new Cruiser(null, true, 220, 200, "A big one", "A tender line", "I suppose a picture is in order");

            Assert.Throws <InvalidAttributeException>(() => CruiserValidator.Validate(cruiser));
            var cruiser2 = new Cruiser("The great seeker of wonder", true, 220, 200, "A big one", "A tender line", "I suppose a picture is in order");
        }
Exemplo n.º 2
0
 public void Execute()
 {
     CruiserValidator.Validate(_cruiser);
 }
        public void EmptyPictureTest()
        {
            var cruiser = new Cruiser("The great seeker of wonder", true, 220, 250, "A big one", "A tender line", null);

            Assert.Throws <InvalidAttributeException>(() => CruiserValidator.Validate(cruiser));
        }
        public void InvalidLoadingShipCapTest()
        {
            var cruiser = new Cruiser("The great seeker of wonder", true, 220, -1, "A big one", "A tender line", "I suppose a picture is in order");

            Assert.Throws <InvalidAttributeException>(() => CruiserValidator.Validate(cruiser));
        }