public void WhenMembersAreInvalidTheCollectionIsInvalid()
        {
            var collection = new EnvironmentConfigurationCollection()
            {
                EnvironmentConfigurationFactory.InvalidProperties
            };

            AssertIsInvalid(collection, 1);
            AssertValidationResult(collection, "Name", "A name must be specified for a property");
        }
        public void WhenMembersAreNotUniqueTheCollectionIsInvalid()
        {
            var collection = new EnvironmentConfigurationCollection()
            {
                EnvironmentConfigurationFactory.Development,
                EnvironmentConfigurationFactory.Development
            };

            AssertIsInvalid(collection, 1);
            AssertValidationResult(collection, null, "There is more than one environment configuration with the same name");
        }
        public void WhenMembersAreUniqueAndValidTheCollectionIsValid()
        {
            var collection = new EnvironmentConfigurationCollection()
            {
                EnvironmentConfigurationFactory.Development,
            };

            AssertIsValid(collection);
        }
 public void WhenEmptyTheCollectionIsInvalid()
 {
     var collection = new EnvironmentConfigurationCollection();
     Assert.That(collection.IsValid(), Is.False);
     AssertValidationResult(collection, null, "There are no environment configurations");
 }