public static void Implicit_conversion___Should_return_same_double_value_passed_to_constructor___When_converting_to_object_of_type_double() { // Arrange var expectedInt = Math.Abs(ThreadSafeRandom.NextDouble()); var systemUnderTest = new PositiveDouble(expectedInt); // Act double actualInt = systemUnderTest; // Assert actualInt.Should().Be(expectedInt); }
public static void Cast___Should_return_the_same_value_passed_to_constructor___When_casting_to_double() { // Arrange var expectedInt = Math.Abs(ThreadSafeRandom.NextDouble()); var systemUnderTest = new PositiveDouble(expectedInt); // Act var actualInt = (double)systemUnderTest; // Assert actualInt.Should().Be(expectedInt); }
public static void Value___Should_return_the_same_value_passed_to_constructor___When_getting() { // Arrange var expectedDouble = Math.Abs(ThreadSafeRandom.NextDouble()); var systemUnderTest = new PositiveDouble(expectedDouble); // Act var actualInt = systemUnderTest.Value; // Assert actualInt.Should().Be(expectedDouble); }
public Square(double x, double y, PositiveDouble sideLength) { X = x; Y = y; SideLength = sideLength; }
public Dimensiones(PositiveDouble alto, PositiveDouble ancho, PositiveDouble largo) { Alto = new PositiveDouble(alto); Ancho = new PositiveDouble(ancho); Largo = new PositiveDouble(largo); }
public Peso(UnidadPeso unidad, PositiveDouble valor) { Unidad = unidad; Valor = valor; }
public BloodGlucoseMeasurement(double mmolPerL) { Value = new PositiveDouble(mmolPerL); }