public void CaptionTimestampPropertiesTest() { //Arrange Timestamp begin1 = new Timestamp(5); Timestamp end1 = new Timestamp(10); double expectedDuration = 5; Speaker s = new Speaker("Guy"); Caption c; //Act c = new Caption("Line,", s, begin1, end1); //Assert Assert.AreEqual(expectedDuration, c.Duration.AsDouble); }
public void CaptionChangeEndTimestampTest() { //Arrange double beginTime = 5; double endTime = 20; double newEndTime = 25; double expectedBegin = 5; double expectedEnd = 25; double expectedDuration = 20; Caption c; //Act c = new Caption("", new Speaker(), new Timestamp(beginTime), new Timestamp(endTime)); c.End = newEndTime; //Assert Assert.AreEqual(expectedBegin, c.Begin.AsDouble); Assert.AreEqual(expectedEnd, c.End.AsDouble); Assert.AreEqual(expectedDuration, c.Duration.AsDouble); }