Ejemplo n.º 1
0
            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);
            }
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]);
            }
Ejemplo n.º 4
0
            public void Aggregate_Null_Exception()
            {
                var facade = new FacadeStub();

                facade.Aggregate <BasicOutputType <string[]> >(null);
            }