public void ParametersXml_ParametersXmlIsSet_ReturnParameters([Frozen] ISheerService sheerService) { //Arrange var parametersXml = @"<outcome>{9016E456-95CB-42E9-AD58-997D6D77AE83}</outcome>"; var baseActionEditor = new BaseActionEditorMock(sheerService); HttpContext.Current = HttpContextMockFactory.Create(new HttpRequest("", "http://google.com", "params=1")); HttpContext.Current.Session["1"] = parametersXml; //Assert var p = baseActionEditor.ParametersMock["outcome"].Should().Be("{9016E456-95CB-42E9-AD58-997D6D77AE83}"); }
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("-"); }
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>")); }
public OutcomeEditor(ISheerService sheerService) : base(sheerService) { }
public BaseActionEditorMock(ISheerService sheerService) : base(sheerService) { }
public void ParametersXml_EmptyParametersXml_ReturnEmptyParameters(HttpContext context, [Frozen] ISheerService sheerService) { //Arrange var baseActionEditor = new BaseActionEditorMock(sheerService); HttpContext.Current = context; //Assert baseActionEditor.ParametersMock.Should().BeEmpty(); }
protected BaseActionEditor(ISheerService sheerService) { this.SheerService = sheerService; }
public BaseActionEditorMock(ISheerService sheerService) : base(sheerService) { }
protected BaseActionEditor(ISheerService sheerService) { this.SheerService = sheerService; }
public OutcomeEditor(ISheerService sheerService) : base(sheerService) { }