public void Aggregate_AllSuccess_200() { var facade = new FacadeStub(); var elements = new FacadeStub.Element[] { new FacadeStub.ElementSub() { Succeeded = true } }; var ret = facade.Aggregate <BasicOutputType <string[]> >(elements); Assert.AreEqual("200", ret.StandardRetur.StatusKode); }
public void Aggregate_Mixed_CorrectReasonAndInput() { var facade = new FacadeStub(); var elements = new FacadeStub.Element[] { new FacadeStub.ElementSub() { Input = "0Inp", Output = "0", Succeeded = false, PossibleErrorReason = "SSSSS" }, new FacadeStub.ElementSub() { Output = "1", Succeeded = true } }; var ret = facade.Aggregate <BasicOutputType <string[]> >(elements); Assert.Greater(ret.StandardRetur.FejlbeskedTekst.IndexOf("SSSSS"), -1); Assert.Greater(ret.StandardRetur.FejlbeskedTekst.IndexOf("0Inp"), -1); }
public void Aggregate_Mixed_ResultPropagatedOnlyForSuccess() { var facade = new FacadeStub(); var elements = new FacadeStub.Element[] { new FacadeStub.ElementSub() { Output = "0", Succeeded = false }, new FacadeStub.ElementSub() { Output = "1", Succeeded = true } }; var ret = facade.Aggregate <BasicOutputType <string[]> >(elements); Assert.Null(ret.Item[0]); Assert.AreEqual("1", ret.Item[1]); }