示例#1
0
        public void ExportData_Equation_ReturnsCorrectStringArray()
        {
            //Arrange
            System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            Mock <IDataset> mockDataset = new Mock <IDataset>();

            mockDataset.Setup(x => x.DatasetID).Returns(It.IsAny <int>);
            mockDataset.Setup(x => x.DatasetToDataTable()).Returns(GetTestDataTable());

            DoseResponseAndNonLinearRegressionAnalysisModel sut = GetModelEquation(mockDataset.Object);

            //Act
            string[] result = sut.ExportData();

            //Assert
            Assert.Equal("Respivs_sp_ivs1,Dose1", result[0]);
            Assert.Equal(19, result.Count());
            Assert.StartsWith("0.971844660194175,1", result[15]);
        }
示例#2
0
        public void ExportData_FourParameter_ReturnsCorrectStringArray()
        {
            //Arrange
            System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
            Mock <IDataset> mockDataset = new Mock <IDataset>();

            mockDataset.Setup(x => x.DatasetID).Returns(It.IsAny <int>);
            mockDataset.Setup(x => x.DatasetToDataTable()).Returns(GetTestDataTable());

            DoseResponseAndNonLinearRegressionAnalysisModel sut = GetModelFourParameter(mockDataset.Object);

            //Act
            string[] result = sut.ExportData();

            //Assert
            Assert.Equal("Respivs_sp_ivs1,Dose1,QCivs_sp_ivsResp1,QCDose1,Sampleivs_sp_ivs1", result[0]);
            Assert.Equal(19, result.Count());
            Assert.StartsWith("0.856310679611651,0.1", result[12]);
        }