예제 #1
0
            public void ThrowException_ValidRequirementButExpectedProcessingTimeNotSet()
            {
                // Arrange
                const VisaType type                   = VisaType.D;
                var            visa                   = new Visa(type);
                var            requirementName        = RequirementName.FromString("Invitation Letter");
                var            requirementDescription =
                    RequirementDescription.FromString("A letter of acceptance from a foreign university.");
                var requirementExample = RequirementExample.FromString("acceptance_letter_example.png");

                // Act & Assert
                Assert.Throws <Exceptions.InvalidEntityState>(() =>
                                                              visa.AddRequirement(requirementName, requirementDescription, requirementExample));
            }
예제 #2
0
            public void AddRequirement_ValidRequirementAndExpectedProcessingTimeSet()
            {
                // Arrange
                const VisaType type                   = VisaType.D;
                var            visa                   = new Visa(type);
                var            requirementName        = RequirementName.FromString("Invitation Letter");
                var            requirementDescription =
                    RequirementDescription.FromString("A letter of acceptance from a foreign university.");
                var requirementExample = RequirementExample.FromString("acceptance_letter_example.png");

                visa.SetExpectedProcessingTime(VisaExpectedProcessingTime.FromInt(30));

                // Act
                visa.AddRequirement(requirementName, requirementDescription, requirementExample);

                //Assert
                Assert.NotEmpty(visa.Requirements);
            }