public void RemoveProperties_GivenEmptyListOfProperties_ShouldReturnErrorMessage()
        {
            //Arrange
            //Act
            var actual = EntityPropertyProcessor.RemoveProperties(new List <string>(), "girlfriend");

            //Assert
            actual.Error.Message.Should().Be("list of Properties entered is empty.");
        }
        public void RemoveProperties_GivenNullListOfProperties_ShouldReturnErrorMessage()
        {
            //Arrange
            //Act
            var actual = EntityPropertyProcessor.RemoveProperties(null, "girlfriend");

            //Assert
            actual.Error.Message.Should().Be("Invalid list of Properties entered.");
        }
        public void RemoveProperties_GivenListOfPropertiesAndPropertyToBeRemove_ShouldRemoveRecord()
        {
            //Arrange
            var listOfProperties = new List <string> {
                "car", "house", "girlfriend"
            };

            //Act
            var actual = EntityPropertyProcessor.RemoveProperties(listOfProperties, "girlfriend");

            //Assert
            Assert.AreEqual(2, actual.Properties.Count);
        }
        public void RemoveProperties_GivenListOfPropertiesAnd1ExistentPropertyNameAnd1NonExistentPropertyNameToBeRemove_ShouldRemoveRecord()
        {
            //Arrange
            var listOfProperties = new List <string> {
                "car", "house", "girlfriend"
            };

            //Act
            var actual = EntityPropertyProcessor.RemoveProperties(listOfProperties, "girlfriend", "UnknownProperty");

            //Assert
            actual.Error.Message.Should().Be("property name UnknownProperty is not found in the entity provided.");
        }
        public void RemoveProperties_GivenListOfColumnsAndNonExistentColumn_ShouldRemoveEntityProperty()
        {
            //Arrange
            var listOfProperties = new List <string> {
                "car", "house", "girlfriend"
            };

            //Act
            var actual = EntityPropertyProcessor.RemoveProperties(listOfProperties, "soccer");

            //Assert
            actual.Error.Message.Should().Be("property name soccer is not found in the entity provided.");
        }
        public void RemoveProperties_GivenInvalidPropertyToBeRemove_ShouldReturnErrorMessage(string propertyNamesToExclude)
        {
            //Arrange
            var listOfProperties = new List <string> {
                "car", "house", "girlfriend"
            };

            //Act
            var actual = EntityPropertyProcessor.RemoveProperties(listOfProperties, propertyNamesToExclude);

            //Assert
            actual.Error.Message.Should().Be("Invalid property name, check your property names.");
        }