public void VectorVelocity_Calculates_Velocity_And_Bearing_Correctly() { var worksheet = new ExcelWorksheetData(TestContext); var velocity = new VectorVelocity() { IsWesterlyVelocity = worksheet.Bool("IsWesterlyVelocity"), IsSoutherlyVelocity = worksheet.Bool("IsSoutherlyVelocity"), EastWestVelocity = worksheet.NShort("EastWestVelocity"), EastWestExceeded = worksheet.Bool("EastWestExceeded"), NorthSouthVelocity = worksheet.NShort("NorthSouthVelocity"), NorthSouthExceeded = worksheet.Bool("NorthSouthExceeded"), }; if (worksheet.String("Speed") == null) { Assert.IsNull(velocity.Speed); } else { Assert.AreEqual(worksheet.Double("Speed"), velocity.Speed.Value, 0.000001); } if (worksheet.String("Bearing") == null) { Assert.IsNull(velocity.Bearing); } else { Assert.AreEqual(worksheet.Double("Bearing"), velocity.Bearing.Value, 0.000001); } }
public void VectorVelocity_Calculates_Velocity_And_Bearing_Correctly() { var worksheet = new ExcelWorksheetData(TestContext); var velocity = new VectorVelocity() { IsWesterlyVelocity = worksheet.Bool("IsWesterlyVelocity"), IsSoutherlyVelocity = worksheet.Bool("IsSoutherlyVelocity"), EastWestVelocity = worksheet.NShort("EastWestVelocity"), EastWestExceeded = worksheet.Bool("EastWestExceeded"), NorthSouthVelocity = worksheet.NShort("NorthSouthVelocity"), NorthSouthExceeded = worksheet.Bool("NorthSouthExceeded"), }; if(worksheet.String("Speed") == null) Assert.IsNull(velocity.Speed); else Assert.AreEqual(worksheet.Double("Speed"), velocity.Speed.Value, 0.000001); if(worksheet.String("Bearing") == null) Assert.IsNull(velocity.Bearing); else Assert.AreEqual(worksheet.Double("Bearing"), velocity.Bearing.Value, 0.000001); }