Ejemplo n.º 1
0
                public void ThrowsExceptionWhenKeyIsEmptyString()
                {
                    var props = new ObjectWithProperties();

                    Should.Throw <ArgumentException>(() => props.ContainsProperty(string.Empty));
                    Should.Throw <ArgumentException>(() => props.ContainsProperty(""));
                }
Ejemplo n.º 2
0
                public void ReturnsTrueWhenPropertyExists()
                {
                    var props = new ObjectWithProperties();

                    props.Properties["Key"] = "value";
                    props.ContainsProperty("Key").ShouldBeTrue();
                }
Ejemplo n.º 3
0
                public void ReturnsFalseWhenPropertyDoesNotExist()
                {
                    var props = new ObjectWithProperties();

                    props.ContainsProperty("Key1").ShouldBeFalse();
                }
Ejemplo n.º 4
0
                public void ThrowsExceptionWhenKeyIsNull()
                {
                    var props = new ObjectWithProperties();

                    Should.Throw <ArgumentNullException>(() => props.ContainsProperty(null));
                }