public void TestSetValueWrongType() { var entry = new LogEntry2(); new Action(() => entry.SetValue(LogFileColumns.RawContent, 42)).Should().Throw <ArgumentException>(); entry.Columns.Should().BeEmpty(); new Action(() => entry.GetValue(LogFileColumns.RawContent)).Should().Throw <ArgumentException>(); }
public void TestSetElapsedTime() { var entry = new LogEntry2(); entry.Columns.Should().BeEmpty(); entry.ElapsedTime = TimeSpan.FromSeconds(23); entry.ElapsedTime.Should().Be(TimeSpan.FromSeconds(23)); entry.Columns.Should().Equal(LogFileColumns.ElapsedTime); entry.GetValue(LogFileColumns.ElapsedTime).Should().Be(TimeSpan.FromSeconds(23)); }
public void TestSetLogEntryIndex() { var entry = new LogEntry2(); entry.Columns.Should().BeEmpty(); entry.LogEntryIndex = 42; entry.LogEntryIndex.Should().Be(42); entry.Columns.Should().Equal(LogFileColumns.LogEntryIndex); entry.GetValue(LogFileColumns.LogEntryIndex).Should().Be(42); }
public void TestSetLogLevel() { var entry = new LogEntry2(); entry.Columns.Should().BeEmpty(); entry.LogLevel = LevelFlags.Fatal; entry.LogLevel.Should().Be(LevelFlags.Fatal); entry.Columns.Should().Equal(LogFileColumns.LogLevel); entry.GetValue(LogFileColumns.LogLevel).Should().Be(LevelFlags.Fatal); }
public void TestSetOriginalLineNumber() { var entry = new LogEntry2(); entry.Columns.Should().BeEmpty(); entry.OriginalLineNumber = 1337; entry.OriginalLineNumber.Should().Be(1337); entry.Columns.Should().Equal(LogFileColumns.OriginalLineNumber); entry.GetValue(LogFileColumns.OriginalLineNumber).Should().Be(1337); }
public void TestSetLineNumber() { var entry = new LogEntry2(); entry.Columns.Should().BeEmpty(); entry.LineNumber = 42; entry.LineNumber.Should().Be(42); entry.Columns.Should().Equal(LogFileColumns.LineNumber); entry.GetValue(LogFileColumns.LineNumber).Should().Be(42); }
public void TestSetOriginalIndex() { var entry = new LogEntry2(); entry.Columns.Should().BeEmpty(); entry.OriginalIndex = 8999; entry.OriginalIndex.Should().Be(8999); entry.Columns.Should().Equal(LogFileColumns.OriginalIndex); entry.GetValue(LogFileColumns.OriginalIndex).Should().Be(8999); }
public void TestSetIndex() { var entry = new LogEntry2(); entry.Columns.Should().BeEmpty(); entry.Index = 9001; entry.Index.Should().Be(9001); entry.Columns.Should().Equal(LogFileColumns.Index); entry.GetValue(LogFileColumns.Index).Should().Be(9001); }
public void TestSetRawContent() { var entry = new LogEntry2(); entry.Columns.Should().BeEmpty(); entry.RawContent = "The last Jedi"; entry.RawContent.Should().Be("The last Jedi"); entry.Columns.Should().Equal(LogFileColumns.RawContent); entry.GetValue(LogFileColumns.RawContent).Should().Be("The last Jedi"); }
public void TestSetTimestamp() { var entry = new LogEntry2(); entry.Columns.Should().BeEmpty(); entry.Timestamp = new DateTime(2017, 12, 20, 13, 33, 0); entry.Timestamp.Should().Be(new DateTime(2017, 12, 20, 13, 33, 0)); entry.Columns.Should().Equal(LogFileColumns.Timestamp); entry.GetValue(LogFileColumns.Timestamp).Should().Be(new DateTime(2017, 12, 20, 13, 33, 0)); }