예제 #1
0
        public void ExactlyTheSameQuotationsShouldBeEqual()
        {
            var quotation1 = new Quotation(DateTime.MinValue, DateTime.MinValue, 5, 5, 5, 5);
            var quotation2 = new Quotation(DateTime.MinValue, DateTime.MinValue, 5, 5, 5, 5);

            quotation1.Equals(quotation2).Should().BeTrue();
        }
예제 #2
0
        public void DifferentQuotationsWithSameDateShouldBeEqual()
        {
            var quotation1 = new Quotation(DateTime.MinValue, DateTime.MinValue, 5, 5, 5, 5);
            var quotation2 = new Quotation(DateTime.MinValue, DateTime.MinValue, 6, 5, 5, 5);

            quotation1.Equals(quotation2).Should().BeTrue();
        }
예제 #3
0
        public void FromDto_ReturnsProperObject()
        {
            //Arrange
            QuotationDto dto = getDefaultQuotationDto();

            //Act
            DataSet   ds                = getDefaultDataSet();
            Quotation quotation         = Quotation.FromDto(ds, dto);
            Quotation expectedQuotation = getDefaultQuotation();

            //Assert
            var areEqual = expectedQuotation.Equals(quotation);

            Assert.IsTrue(areEqual);
        }