public void UpdateRequirementExample(RequirementId requirementId, RequirementExample example) { Apply(new RequirementEvents.ExampleChanged { Id = requirementId, Example = example }); }
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)); }
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); }
public void AddRequirement(RequirementName name, RequirementDescription description, RequirementExample example) { Apply(new RequirementEvents.AddedToVisa { RequirementId = Guid.NewGuid(), VisaId = Id, Name = name, Description = description, Example = example }); }