Ejemplo n.º 1
0
        public void LazyLogLine_Create_VerifyPropertyValuesAfterCreate_Test()
        {
            // Arrange & Act
            var logLine = new LazyLogLine("Foo", 1, LogLineType.LogOpen, line => TimeSpan.FromMinutes(1), line => "Foo");

            // Assert
            Assert.AreEqual("Foo", logLine.Raw);
            Assert.AreEqual(1, logLine.Index);
            Assert.AreEqual(LogLineType.LogOpen, (int)logLine.LineType);
            Assert.AreEqual(TimeSpan.FromMinutes(1), logLine.TimeStamp);
            Assert.AreEqual("Foo", logLine.Data);
        }
Ejemplo n.º 2
0
        public void LazyLogLine_VerifyPropertyValuesCanBeSet_Test()
        {
            // Arrange
            var logLine = new LazyLogLine(null, 0, LogLineType.None, line => null, line => null);

            // Act
            logLine.Raw       = "Foo";
            logLine.Index     = 1;
            logLine.LineType  = LogLineType.LogOpen;
            logLine.TimeStamp = TimeSpan.FromMinutes(1);
            logLine.Data      = "Foo";
            // Assert
            Assert.AreEqual("Foo", logLine.Raw);
            Assert.AreEqual(1, logLine.Index);
            Assert.AreEqual(LogLineType.LogOpen, (int)logLine.LineType);
            Assert.AreEqual(TimeSpan.FromMinutes(1), logLine.TimeStamp);
            Assert.AreEqual("Foo", logLine.Data);
        }