コード例 #1
0
        public void Add()
        {
            UnixTimestamp timestamp = rawTimestamp;

            Assert.AreEqual(date.Add(TimeSpan.FromMinutes(2)).Ticks, timestamp.Add(TimeSpan.FromMinutes(2)).DateTime.Ticks);
            Assert.AreEqual(date.Add(TimeSpan.FromMinutes(-2)).Ticks, timestamp.Add(TimeSpan.FromMinutes(-2)).DateTime.Ticks);
        }
コード例 #2
0
 public void AddReturnsExpected(
     UnixTimestamp timestamp1,
     UnixTimestamp timestamp2)
 {
     var expected = timestamp1 + timestamp2;
     Assert.Equal(expected, timestamp1.Add(timestamp2));
 }
コード例 #3
0
        public void AddReturnsExpected(
            UnixTimestamp timestamp1,
            UnixTimestamp timestamp2)
        {
            var expected = timestamp1 + timestamp2;

            Assert.Equal(expected, timestamp1.Add(timestamp2));
        }