public void Aggregate_AllFailed_503() { var facade = new FacadeStub(); var elements = new FacadeStub.Element[] { new FacadeStub.ElementSub() { Succeeded = false } }; var ret = facade.Aggregate <BasicOutputType <string[]> >(elements); Assert.AreEqual("503", 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]); }
public void Aggregate_Null_Exception() { var facade = new FacadeStub(); facade.Aggregate <BasicOutputType <string[]> >(null); }