コード例 #1
0
        public void StructuralEquality(int number, string desc, double val)
        {
            PrgParam prgParamA = new PrgParam.Builder().WithProperties(number, desc, val).Build();
            PrgParam prgParamB = new PrgParam.Builder().WithProperties(number, desc, val).Build();

            prgParamA.Should().Be(prgParamB);
        }
コード例 #2
0
        public void BuildWithInvalidName(string name)
        {
            //Arrange

            //Act
            PrgParam pp = new PrgParam.Builder().WithName(name).Build();

            //Assert
            pp.Should().BeNull();
        }
コード例 #3
0
        public void BuildWithInvalidProperties(int number, string desc, double val)
        {
            //Arrange

            //Act
            PrgParam pp = new PrgParam.Builder().WithProperties(number, desc, val).Build();

            //Assert
            pp.Should().BeNull();
        }
コード例 #4
0
        public void AddAndRetrieve(int number, string desc, double value)
        {
            //Arrange
            PrgParam  addedPrgParam = new PrgParam.Builder().WithProperties(number, desc, value).Build();
            PrgParams prgParamDic   = new PrgParams();

            //Act
            prgParamDic.Add(addedPrgParam);

            //Assert

            PrgParam retrievedPrgParam = prgParamDic[addedPrgParam.Name];

            addedPrgParam.Should().Be(retrievedPrgParam);
        }