예제 #1
0
 public void OnOk_EmptyParameters_ReturnDashRsult(HttpContext context, [Frozen]ISheerService sheerService)
 {
   //Arrange
   var baseActionEditor = new BaseActionEditorMock(sheerService);
   HttpContext.Current = context;
   //Act
   baseActionEditor.OnOkMock(this,new EventArgs());
   
   //Assert
   sheerService.Received().SetDialogValue("-");
 }
예제 #2
0
        public void OnOk_EmptyParameters_ReturnDashRsult(HttpContext context, [Frozen] ISheerService sheerService)
        {
            //Arrange
            var baseActionEditor = new BaseActionEditorMock(sheerService);

            HttpContext.Current = context;
            //Act
            baseActionEditor.OnOkMock(this, new EventArgs());

            //Assert
            sheerService.Received().SetDialogValue("-");
        }
예제 #3
0
    public void OnOk_ParametersAreSet_ReturnParametersXml(HttpContext context, [Frozen]ISheerService sheerService)
    {
      //Arrange
      var baseActionEditor = new BaseActionEditorMock(sheerService);
      HttpContext.Current = context;
      baseActionEditor.ParametersMock.Add("outcome", "{00889a5e-81da-459f-8bd8-853983ba7a84}");
      
      //Act
      baseActionEditor.OnOkMock(this, new EventArgs());

      //Assert
      sheerService.Received().SetDialogValue(HttpUtility.HtmlEncode("<outcome>{00889a5e-81da-459f-8bd8-853983ba7a84}</outcome>"));
    }
예제 #4
0
        public void OnOk_ParametersAreSet_ReturnParametersXml(HttpContext context, [Frozen] ISheerService sheerService)
        {
            //Arrange
            var baseActionEditor = new BaseActionEditorMock(sheerService);

            HttpContext.Current = context;
            baseActionEditor.ParametersMock.Add("outcome", "{00889a5e-81da-459f-8bd8-853983ba7a84}");

            //Act
            baseActionEditor.OnOkMock(this, new EventArgs());

            //Assert
            sheerService.Received().SetDialogValue(HttpUtility.HtmlEncode("<outcome>{00889a5e-81da-459f-8bd8-853983ba7a84}</outcome>"));
        }