Пример #1
0
        public void AnalysisDataModelBaseTestClass_AvailableVariablesAllowNull_ReturnsListStringWithFirstEmptyValue()
        {
            //Arrange
            System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            Dataset dataset = GetDataset();

            AnalysisDataModelBaseTestClass sut = new AnalysisDataModelBaseTestClass(dataset, "TestScript");

            //Act
            IEnumerable <string> result = sut.AvailableVariablesAllowNull;

            //Assert
            Assert.IsAssignableFrom <IEnumerable <string> >(result);
            Assert.Equal(String.Empty, result.First());
            Assert.Equal("TestScript", sut.ScriptFileName);
        }
Пример #2
0
        public void AnalysisDataModelBaseTestClass_Constructor_InitializesObject()
        {
            //Arrange
            System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            Dataset dataset = GetDataset();

            //Act
            AnalysisDataModelBaseTestClass sut = new AnalysisDataModelBaseTestClass(dataset, "TestScript");

            //Assert
            Assert.Equal(6, sut.DatasetID);
            Assert.Equal(new List <string>()
            {
                "Resp 1", "Resp2", "Resp 3", "Resp4", "Resp 5", "Resp 6", "Resp 7", "Resp8", "Resp:9", "Resp-10", "Resp^11", "Treat1", "Treat2", "Treat3", "Treat4", "Treat(5", "Treat£6", "Treat:7", "Treat}8", "PVTestresponse1", "PVTestresponse2", "PVTestgroup"
            }, sut.AvailableVariables);
            Assert.Equal(12, sut.DataTable.Rows.Count);
            Assert.Equal("TestScript", sut.ScriptFileName);
        }