public void TryGetValue_IntContentNotAvailable_ReturnsZero(string key) { // Arrange var logMessage = new LogMessage(LogLevel.Error, _testMessage, _testCode); // Act var entry = new ErrorListTableEntry(logMessage); // Assert entry.Should().NotBeNull(); entry.TryGetValue(key, out var result).Should().BeFalse(); result.Should().BeNull(); }
public void TryGetValue_StringContent_ReturnsValues(string key, string content) { // Arrange var logMessage = new RestoreLogMessage(LogLevel.Error, _testCode, _testMessage) { ProjectPath = _testProjectPath }; // Act var entry = new ErrorListTableEntry(logMessage); // Assert entry.Should().NotBeNull(); entry.TryGetValue(key, out var result).Should().BeTrue(); (result is string).Should().BeTrue(); (result as string).Should().Be(content); }
public void TryGetValue_IntContent_ReturnsValues(string key, int content) { // Arrange var logMessage = new RestoreLogMessage(LogLevel.Error, _testCode, _testMessage) { StartLineNumber = _testLineNumber, StartColumnNumber = _testColumnNumber }; // Act var entry = new ErrorListTableEntry(logMessage); // Assert entry.Should().NotBeNull(); entry.TryGetValue(key, out var result).Should().BeTrue(); (result is int).Should().BeTrue(); ((int)result).Should().Be(content); }