Beispiel #1
0
        public void GatewayReturnsAPropertyWhenGivenARef()
        {
            var property = AddPropertyToDatabase();
            var response = _classUnderTest.GetPropertyByPropertyReference(property.PropRef);

            response.Should().NotBeNull();
            response.PropRef.Should().Be(property.PropRef);
        }
        public void GatewayReturnsAPropertyWhenGivenARef()
        {
            var expectedProperty = _uhPropertyHelper.GenerateUhProperty();

            _uhContext.UhPropertys.Add(expectedProperty);
            _uhContext.SaveChanges();

            var response = _classUnderTest.GetPropertyByPropertyReference(expectedProperty.PropRef);

            Assert.NotNull(response);
            Assert.IsInstanceOf <Property>(response);
            Assert.AreEqual(expectedProperty.PropRef, response.PropRef);
            Assert.AreEqual(expectedProperty.Telephone, response.Telephone);
            Assert.AreEqual(expectedProperty.Address1, response.Address1);
        }