예제 #1
0
        public void Constructor_NullOrWhitespace(string name)
        {
            // act
            ArgumentException exception = Assert.Throws <ArgumentException>(() => _ = AssetName.Parse(name, null));

            // assert
            exception !.ParamName.Should().Be("rawName");
            exception.Message.Should().Be("The asset name can't be null or empty. (Parameter 'rawName')");
        }
 public void Null_object_throws_ArgumentNullException()
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           ((object)null !).ToStringFromPublicProperties())
     .ParamName.Should().Be("item");
 }