Ejemplo n.º 1
0
            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);
            }
Ejemplo n.º 2
0
            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);
            }
Ejemplo n.º 3
0
            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]);
            }