Beispiel #1
0
        public void UpdateProjectNumbers_NullLand()
        {
            // Arrange
            var projectProperty = new ProjectProperty()
            {
                PropertyType = PropertyTypes.Land,
            };

            // Act
            // Assert
            Assert.Throws <InvalidOperationException>(() => projectProperty.UpdateProjectNumbers("3"));
        }
Beispiel #2
0
        public void UpdateProjectNumbers_Subdivision()
        {
            // Arrange
            var projectProperty = new ProjectProperty()
            {
                PropertyType = PropertyTypes.Subdivision,
            };

            // Act
            var result = projectProperty.UpdateProjectNumbers("5");

            // Assert
            result.Should().BeNull();
        }
Beispiel #3
0
        public void UpdateProjectNumbers_Land_NoProjects()
        {
            // Arrange
            var parcel          = new Parcel();
            var projectProperty = new ProjectProperty()
            {
                PropertyType = PropertyTypes.Land,
                Parcel       = parcel
            };

            // Act
            var result = projectProperty.UpdateProjectNumbers("3");

            // Assert
            result.ProjectNumbers.Should().Be("[\"3\"]");
        }
Beispiel #4
0
        public void UpdateProjectNumbers_Building_NoProjects()
        {
            // Arrange
            var building        = new Building();
            var projectProperty = new ProjectProperty()
            {
                PropertyType = PropertyTypes.Building,
                Building     = building
            };

            // Act
            var result = projectProperty.UpdateProjectNumbers("3");

            // Assert
            result.ProjectNumbers.Should().Be("[\"3\"]");
        }
Beispiel #5
0
        public void UpdateProjectNumbers_AddLand()
        {
            // Arrange
            var parcel = new Parcel
            {
                ProjectNumbers = "[\"1\",\"2\",\"3\",\"4\"]"
            };
            var projectProperty = new ProjectProperty()
            {
                PropertyType = PropertyTypes.Land,
                Parcel       = parcel
            };

            // Act
            var result = projectProperty.UpdateProjectNumbers("5");

            // Assert
            result.ProjectNumbers.Should().Be("[\"1\",\"2\",\"3\",\"4\",\"5\"]");
        }
Beispiel #6
0
        public void UpdateProjectNumbers_AddBuilding()
        {
            // Arrange
            var building = new Building
            {
                ProjectNumbers = "[\"1\",\"2\",\"3\",\"4\"]"
            };
            var projectProperty = new ProjectProperty()
            {
                PropertyType = PropertyTypes.Building,
                Building     = building
            };

            // Act
            var result = projectProperty.UpdateProjectNumbers("5");

            // Assert
            result.ProjectNumbers.Should().Be("[\"1\",\"2\",\"3\",\"4\",\"5\"]");
        }