public bool Equals(PolarValues other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.Int == Int
         && other.Long == Long
         && other.Float.Equals(Float)
         && other.Double.Equals(Double)
         && other.Decimal == Decimal;
 }
        public void Can_serialize_min_values()
        {
            var dto = new PolarValues {
                Int     = int.MinValue,
                Long    = long.MinValue,
                Float   = float.MinValue,
                Double  = double.MinValue,
                Decimal = decimal.MinValue,
            };
            var to = Serialize(dto);

            Assert.That(to, Is.EqualTo(dto));
        }
        public void Can_serialize_max_values_less_1()
        {
            var dto = new PolarValues {
                Int     = int.MaxValue - 1,
                Long    = long.MaxValue - 1,
                Float   = float.MaxValue - 1,
                Double  = double.MaxValue - 1,
                Decimal = decimal.MaxValue - 1,
            };
            var to = Serialize(dto);

            Assert.That(to, Is.EqualTo(dto));
        }
Beispiel #4
0
 public bool Equals(PolarValues other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(other.Int == Int &&
            other.Long == Long &&
            other.Float.Equals(Float) &&
            other.Double.Equals(Double) &&
            other.Decimal == Decimal);
 }
		public void Can_serialize_min_values()
		{
			var dto = new PolarValues {
				Int = int.MinValue,
				Long = long.MinValue,
				Float = float.MinValue,
				Double = double.MinValue,
				Decimal = decimal.MinValue,
			};
			var to = Serialize(dto);
			Assert.That(to, Is.EqualTo(dto));
		}
		public void Can_serialize_max_values_less_1()
		{
			var dto = new PolarValues {
				Int = int.MaxValue - 1,
				Long = long.MaxValue - 1,
				Float = float.MaxValue - 1,
				Double = double.MaxValue - 1,
				Decimal = decimal.MaxValue - 1,
			};
			var to = Serialize(dto);
			Assert.That(to, Is.EqualTo(dto));
		}
			public bool Equals(PolarValues other)
			{
				if (ReferenceEquals(null, other)) return false;
				if (ReferenceEquals(this, other)) return true;
				return other.Int == Int
					&& other.Long == Long
					&& other.Float.Equals(Float)
					&& other.Double.Equals(Double)
					&& other.Decimal == Decimal;
			}