public void FactoryPopulatesTheMetadataFieldWithWhatIsPassedInAsAnArgument() { // arrange var expectedMetadata = new Metadata { Error = Randomm.Text(), PostCode = Randomm.Postcode(), PostCodeLatitude = Randomm.Latitude(), PostCodeLongitude = Randomm.Longitude() }; // act var factoryResult = ServiceFactory.SearchServiceUsecaseResponse(null, null, expectedMetadata); // assert factoryResult.Metadata.Error.Should().Be(expectedMetadata.Error); factoryResult.Metadata.PostCode.Should().Be(expectedMetadata.PostCode); factoryResult.Metadata.PostCodeLatitude.Should().Be(expectedMetadata.PostCodeLatitude); factoryResult.Metadata.PostCodeLongitude.Should().Be(expectedMetadata.PostCodeLongitude); }