public void ToString(string expected, double speed, double direction, double gust) { var instance = new Core.Types.Wind( new Core.Types.Speed(speed, Units.Speed.MeterPerSecond), new Core.Types.Direction(direction), new Core.Types.Speed(gust, Units.Speed.MeterPerSecond)); Assert.AreEqual(expected, instance.ToString()); }
public void Constructor(double speed, double direction, double gust) { var instance = new Core.Types.Wind( new Core.Types.Speed(speed, Units.Speed.MeterPerSecond), new Core.Types.Direction(direction), new Core.Types.Speed(gust, Units.Speed.MeterPerSecond)); Assert.AreEqual(speed, instance.Speed.GetSpeed(Units.Speed.MeterPerSecond)); Assert.AreEqual(direction, instance.Direction.Degree); Assert.AreEqual(gust, instance.Gust.GetSpeed(Units.Speed.MeterPerSecond)); }
public void InequalityPositive(double speedA, double directionA, double gustA, double speedB, double directionB, double gustB) { var first = new Core.Types.Wind( new Core.Types.Speed(speedA, Units.Speed.MeterPerSecond), new Core.Types.Direction(directionA), new Core.Types.Speed(gustA, Units.Speed.MeterPerSecond)); var second = new Core.Types.Wind( new Core.Types.Speed(speedB, Units.Speed.MeterPerSecond), new Core.Types.Direction(directionB), new Core.Types.Speed(gustB, Units.Speed.MeterPerSecond)); Assert.AreNotEqual(first, second); Assert.AreNotEqual((object)first, (object)second); Assert.AreNotEqual(first.GetHashCode(), second.GetHashCode()); Assert.IsTrue(first != second); }