コード例 #1
0
        public void Create_CalculationNull_ThrowsArgumentNullException()
        {
            // Call
            void Call() => PersistableProjectInfoFactory.Create(null, string.Empty);

            // Assert
            var exception = Assert.Throws <ArgumentNullException>(Call);

            Assert.AreEqual("calculation", exception.ParamName);
        }
コード例 #2
0
        public void Create_WithValidData_ReturnsPersistableProjectInfo()
        {
            // Setup
            MacroStabilityInwardsCalculationScenario calculation = MacroStabilityInwardsCalculationScenarioTestFactory.CreateMacroStabilityInwardsCalculationScenarioWithValidInput(new TestHydraulicBoundaryLocation());
            const string filePath = "SomeFilePath";

            // Call
            PersistableProjectInfo persistableProjectInfo = PersistableProjectInfoFactory.Create(calculation, filePath);

            // Assert
            PersistableDataModelTestHelper.AssertProjectInfo(calculation, filePath, persistableProjectInfo);
        }