示例#1
0
    public void serviceIsBPManagementForValidSource()
    {
        //Arrange
        var expectedClinicalElementValue = "Zedmed";

        utilScvMOCK
        .Setup(s => s.GetConfiguration())
        .Returns(expectedClinicalElementValue)
        .Verifiable();

        var sut = new myRealClass(utilScvMOCK.Object);

        //Act
        var actualClinicalElementValue = sut.myworkingMethod();

        //Assert
        configHelperMOCK.Verify();
        Assert.AreEqual(expectedClinicalElementValue, actualClinicalElementValue);
    }
    public void serviceIsBPManagementForValidSource()
    {
        //Arrange
        var sectionName                  = "sectionName/sectionElement";
        var clinicalElementName          = "ClinicalSystem";
        var expectedClinicalElementValue = "Zedmed";

        configHelperMOCK
        .Setup(s => s.GetConfiguration(sectionName, clinicalElementName))
        .Returns(expectedClinicalElementValue)
        .Verifiable();

        var sut = new myRealClass(configHelperMock.Object);

        //Act
        var actualClinicalElementValue = sut.myworkingMethod();

        //Assert
        configHelperMOCK.Verify();
        Assert.AreEqual(expectedClinicalElementValue, actualClinicalElementValue);
    }