public void FindByVariableName_ThrowsArgumentOutOfRangeExceptionIfThereIsAreMoreThanOneMembershipFunctionsForVariable()
        {
            // Arrange
            _membershipFunctionList.Add(new StubMembershipFunction("FunctionNr1"));
            string variableName = "FunctionNr1";

            // Act & Assert
            Assert.Throws <ArgumentOutOfRangeException>(() => { _membershipFunctionList.FindByVariableName(variableName); });
        }
        private LinguisticVariable CreateLinguisticVariableEntity(LinguisticVariableStrings linguisticVariableStrings)
        {
            var isInitial           = linguisticVariableStrings.DataOrigin.ToEnum <DataOriginType>() == DataOriginType.Initial;
            var membershipFunctions = new MembershipFunctionList();

            foreach (var membershipFunctionStrings in linguisticVariableStrings.MembershipFunctions)
            {
                var functionType       = membershipFunctionStrings.MembershipFunctionType.ToEnum <MembershipFunctionType>();
                var membershipFunction = _membershipFunctionCreator.CreateMembershipFunctionEntity(
                    functionType, membershipFunctionStrings.MembershipFunctionName, membershipFunctionStrings.MembershipFunctionValues);
                membershipFunctions.Add(membershipFunction);
            }
            return(new LinguisticVariable(linguisticVariableStrings.VariableName, membershipFunctions, isInitial));
        }