コード例 #1
0
        public void IsImportAndExportStatesCombinationValid_OnlyExportState_ReturnsTrue()
        {
            // Arrange
            var validator = new TransportRouteValidation(allowedCombinations, unitedKingdomAuthorities);

            // Act
            bool result = validator.IsImportAndExportStatesCombinationValid(null, new TestableStateOfExport());

            // Assert
            Assert.True(result);
        }
コード例 #2
0
        public void IsImportAndExportStatesCombinationValid_DifferentCountries_ReturnsTrue()
        {
            // Arrange
            var export = new TestableStateOfExport
            {
                Country = unitedKingdomCountry
            };
            var import = new TestableStateOfImport
            {
                Country = nonUkCountry
            };
            var validator = new TransportRouteValidation(allowedCombinations, unitedKingdomAuthorities);

            // Act
            bool result = validator.IsImportAndExportStatesCombinationValid(import, export);

            // Assert
            Assert.True(result);
        }
コード例 #3
0
        public void IsImportAndExportStatesCombinationValid_SameCountryAllowed_ReturnsTrue()
        {
            // Arrange
            var export = new TestableStateOfExport
            {
                Country            = unitedKingdomCountry,
                CompetentAuthority = secondUkCompetentAuthority
            };
            var import = new TestableStateOfImport
            {
                Country            = unitedKingdomCountry,
                CompetentAuthority = thirdUkCompetentAuthority
            };
            var validator = new TransportRouteValidation(allowedCombinations, unitedKingdomAuthorities);

            // Act
            bool result = validator.IsImportAndExportStatesCombinationValid(import, export);

            // Assert
            Assert.True(result);
        }