public void ItShould_have_only_one_object_in_metadata_when_add_Warning() { // arrange var sut = _fixture.Create <string>(); var exception = new SimpleCustomException(); // act sut.AddWarning(exception.ToString()); // assert Assert.NotNull(sut.Metadata.Message); }
public void ItShould_have_string_type_for_metadata_Warning() { // arrange var sut = _fixture.Create <string>(); var exception = new SimpleCustomException(); // act sut.AddWarning(exception.ToString()); // assert Assert.Equal(MetadataType.Warning, sut.Metadata.Type); }
public void ItShould_have_string_type_for_metadata_Info() { // arrange var sut = _fixture.Create <string>(); var exception = new SimpleCustomException(); // act sut.AddInfo(exception.ToString()); // assert Assert.NotNull(sut.Metadata.Message); Assert.Equal(MetadataType.Info, sut.Metadata.Type); }
public void ItShould_have_only_one_object_in_metadata_when_add_Info_with_Error_added_before() { // arrange var sut = _fixture.Create <string>(); var exception = new SimpleCustomException(); var expected = exception.Message; // act sut.AddInfo(exception.ToString()); sut.AddError(expected); // assert Assert.NotNull(sut.Metadata); Assert.Equal(expected, sut.Metadata.Message); }
public void ItShould_have_last_added_type_object_in_metadata() { // arrange var sut = _fixture.Create <string>(); var exception = new SimpleCustomException(); var expected = exception.Message; // act sut.AddWarning(expected); sut.AddInfo(exception.ToString()); // assert Assert.NotNull(sut.Metadata); Assert.Equal(MetadataType.Info, sut.Metadata.Type); }