コード例 #1
0
        public void IsValidForFailureMechanism_StochasticSoilModelOfInvalidType_ReturnsFalse(StochasticSoilModel model)
        {
            // Setup
            var filter = new PipingStochasticSoilModelFilter();

            // Call
            bool isValid = filter.IsValidForFailureMechanism(model);

            // Assert
            Assert.IsFalse(isValid);
        }
コード例 #2
0
        public void IsValidForFailureMechanism_ValidStochasticSoilModelType_ReturnsFalse()
        {
            // Setup
            var filter = new PipingStochasticSoilModelFilter();
            var model  = new StochasticSoilModel(nameof(FailureMechanismType.Piping), FailureMechanismType.Piping);

            // Call
            bool isValid = filter.IsValidForFailureMechanism(model);

            // Assert
            Assert.IsTrue(isValid);
        }
コード例 #3
0
        public void IsValidForFailureMechanism_StochasticSoilModelNull_ThrowsArgumentNullException()
        {
            // Setup
            var filter = new PipingStochasticSoilModelFilter();

            // Call
            TestDelegate test = () => filter.IsValidForFailureMechanism(null);

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

            Assert.AreEqual("stochasticSoilModel", exception.ParamName);
        }