public void Submitted_Property_With_Amenities_Returns_Property_Description_Including_Amenity_List()
        {
            //Arrange
            var property = new SubmittedProperty
            {
                PropertyType = PropertyType.House,
                Amenities =
                    new List<Amenity>
                    {
                        new Amenity {AmenityType = AmenityType.Shopping, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Restaurants, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Bars, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Cafes, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.TrainStation, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.BusStop, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Schools, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Parks, AmenityValue = "Yes"},
                    }
            };

            //Act
            var description = property.BuildPropertyDescription();

            //Assert
            description.Should().NotBeNullOrEmpty();
            description.Should()
                .Be(
                    "No upfront rent, no upfront fees and no deposit needed. LetMe are proud to present this House.\r\nThe property is located near to the following amenities:\r\n- Shopping\r\n- Restaurants\r\n- Bars\r\n- Cafes\r\n- Train Station\r\n- Bus Stop\r\n- Schools\r\n- Parks\r\n");
        }
Exemplo n.º 2
0
 public Description GenerateDescription(SubmittedProperty submittedProperty, List<Detail> content)
 {
     return new Description
     {
         ShortDescription = submittedProperty.BuildShortDescription(),
         PropertyDescription = submittedProperty.BuildPropertyDescription(),
     };
 }
        public void Empty_Submitted_Property_Returns_Property_Description()
        {
            //Arrange
            var property = new SubmittedProperty();

            //Act
            var description = property.BuildPropertyDescription();

            //Assert
            description.Should().NotBeNullOrEmpty();
            description.Should()
                .Be("No upfront rent, no upfront fees and no deposit needed. LetMe are proud to present this Property.\r\n");
        }
        public void Submitted_Property_With_Bath_Feature_Returns_Property_Description_Including_Baths()
        {
            //Arrange
            var property = new SubmittedProperty
            {
                PropertyType = PropertyType.House,
                Features =
                    new List<Feature> { new Feature { FeatureType = FeatureType.NumberOfBathrooms, FeatureValue = "2" } }
            };

            //Act
            var description = property.BuildPropertyDescription();

            //Assert
            description.Should().NotBeNullOrEmpty();
            description.Should()
                .Be("No upfront rent, no upfront fees and no deposit needed. LetMe are proud to present this 2 Bathroom House.\r\n");
        }
        public void Submitted_Property_With_Property_Type_Returns_Property_Description_Including_Type()
        {
            //Arrange
            var property = new SubmittedProperty
            {
                PropertyType = PropertyType.House
            };

            //Act
            var description = property.BuildPropertyDescription();

            //Assert
            description.Should().NotBeNullOrEmpty();
            description.Should()
                .Be("No upfront rent, no upfront fees and no deposit needed. LetMe are proud to present this House.\r\n");
        }
        public void Submitted_Property_With_Features_Returns_Property_Description_Including_Feature_List()
        {
            //Arrange
            var property = new SubmittedProperty
            {
                PropertyType = PropertyType.House,
                Features =
                    new List<Feature>
                    {
                        new Feature {FeatureType = FeatureType.Garden, FeatureValue = "Full Double Glazing"},
                        new Feature {FeatureType = FeatureType.Parking, FeatureValue = "Garage"},
                        new Feature {FeatureType = FeatureType.WhiteGoods, FeatureValue = "Yes"},
                        new Feature {FeatureType = FeatureType.Furnishing, FeatureValue = "Fully"},
                        new Feature {FeatureType = FeatureType.Pets, FeatureValue = "Small Pets"},
                        new Feature {FeatureType = FeatureType.DecorativeCondition, FeatureValue = "Good"},
                        new Feature {FeatureType = FeatureType.Glazing, FeatureValue = "Full Double Glazing"},
                        new Feature {FeatureType = FeatureType.Heating, FeatureValue = "Gas"},
                    }
            };

            //Act
            var description = property.BuildPropertyDescription();

            //Assert
            description.Should().NotBeNullOrEmpty();
            description.Should()
                .Be(
                    "No upfront rent, no upfront fees and no deposit needed. LetMe are proud to present this House.\r\nThe property benefits from the following features:\r\n- Full Double Glazing\r\n- Garage\r\n- Whitegoods Included\r\n- Fully Furnished\r\n- Small Pets Allowed\r\n- Good Condition\r\n- Full Double Glazing\r\n- Gas Central Heating\r\n");
        }
        public void Submitted_Property_With_Features_And_Amenities_Returns_Property_Description_Including_Features_And_Amenity_List()
        {
            //Arrange
            var property = new SubmittedProperty
            {
                PropertyType = PropertyType.House,
                Features =
                    new List<Feature>
                    {
                        new Feature { FeatureType = FeatureType.MultipleOccupancy, FeatureValue = "Yes" },
                        new Feature { FeatureType = FeatureType.NumberOfBedrooms, FeatureValue = "3" },
                        new Feature { FeatureType = FeatureType.NumberOfBathrooms, FeatureValue = "2" },
                        new Feature {FeatureType = FeatureType.Garden, FeatureValue = "Full Double Glazing"},
                        new Feature {FeatureType = FeatureType.Parking, FeatureValue = "Garage"},
                        new Feature {FeatureType = FeatureType.WhiteGoods, FeatureValue = "Yes"},
                        new Feature {FeatureType = FeatureType.Furnishing, FeatureValue = "Fully"},
                        new Feature {FeatureType = FeatureType.Pets, FeatureValue = "Small Pets"},
                        new Feature {FeatureType = FeatureType.DecorativeCondition, FeatureValue = "Good"},
                        new Feature {FeatureType = FeatureType.Glazing, FeatureValue = "Full Double Glazing"},
                        new Feature {FeatureType = FeatureType.Heating, FeatureValue = "Gas"},
                    },
                Amenities =
                    new List<Amenity>
                    {
                        new Amenity {AmenityType = AmenityType.Shopping, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Restaurants, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Bars, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Cafes, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.TrainStation, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.BusStop, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Schools, AmenityValue = "Yes"},
                        new Amenity {AmenityType = AmenityType.Parks, AmenityValue = "Yes"},
                    }
            };

            //Act
            var description = property.BuildPropertyDescription();

            //Assert
            description.Should().NotBeNullOrEmpty();
            description.Should()
                .Be(
                    "No upfront rent, no upfront fees and no deposit needed. LetMe are proud to present this Room in a 3 Bedroom, 2 Bathroom House.\r\nThe property benefits from the following features:\r\n- Full Double Glazing\r\n- Garage\r\n- Whitegoods Included\r\n- Fully Furnished\r\n- Small Pets Allowed\r\n- Good Condition\r\n- Full Double Glazing\r\n- Gas Central Heating\r\nThe property is located near to the following amenities:\r\n- Shopping\r\n- Restaurants\r\n- Bars\r\n- Cafes\r\n- Train Station\r\n- Bus Stop\r\n- Schools\r\n- Parks\r\n");
        }