public void ByLevelAndOffset_ValidArgs() { var elevation = 100.0; var offset = 100.0; var level = Level.ByElevation(elevation); var level2 = Level.ByLevelAndOffset(level, offset); Assert.NotNull(level2); level2.Elevation.ShouldBeApproximately(elevation + offset); level2.ProjectElevation.ShouldBeApproximately(elevation + offset); // without unit conversion InternalElevation(level2) .ShouldBeApproximately((elevation + offset) * UnitConverter.DynamoToHostFactor(UnitType.UT_Length)); }
public void ByLevelAndOffset_NullArgument() { var offset = 100; Assert.Throws(typeof(ArgumentNullException), () => Level.ByLevelAndOffset(null, offset)); }