public void Create_IdGeneratorNull_ThrowsArgumentNullException() { // Call TestDelegate call = () => SerializableAssessmentProcessCreator.Create(null, new SerializableAssessmentSection()); // Assert var exception = Assert.Throws <ArgumentNullException>(call); Assert.AreEqual("idGenerator", exception.ParamName); }
public void Create_WithValidArguments_ReturnsSerializableAssessmentProcess() { // Setup const string assessmentSectionId = "assessmentSectionId"; var serializableAssessmentSection = new SerializableAssessmentSection(assessmentSectionId, string.Empty, CreateGeometry()); var idGenerator = new IdentifierGenerator(); // Call SerializableAssessmentProcess serializableProcess = SerializableAssessmentProcessCreator.Create(idGenerator, serializableAssessmentSection); // Assert Assert.AreEqual("Bp.0", serializableProcess.Id); Assert.AreEqual(serializableAssessmentSection.Id, serializableProcess.AssessmentSectionId); }