예제 #1
0
        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);
        }
예제 #2
0
        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);
        }