예제 #1
0
        public void ExcelTimeTests_ConstructorWithValue_ShouldSetSecond()
        {
            // Arrange
            decimal value = 3662M / (decimal)SecondsPerDay;

            // Act
            var time = new ExcelTime(value);

            // Assert
            Assert.AreEqual(2, time.Second);
        }
예제 #2
0
        public void TimeFormula_ValueIsSetFromConstructorValidateSecond()
        {
            // Arrange
            var time = new ExcelTime(0.812M);
            LoadXmlTestData("A1", "time", "0.812");

            // Act
            var formula = new ExcelDataValidationTime(_sheet, "A1", ExcelDataValidationType.Time, _dataValidationNode, _namespaceManager);

            // Assert
            Assert.AreEqual(time.Second.Value, formula.Formula.Value.Second.Value);
        }
예제 #3
0
 public void Cleanup()
 {
     _time = null;
 }
예제 #4
0
 public void Setup()
 {
     _time = new ExcelTime();
 }