コード例 #1
0
        public void GivenBHPFinancials_WhenStoreObservations2D_ExpectValuesStored()
        {
            COMAPIGateway gateway = new COMAPIGateway();

            StoreObservations2DCommand command = new StoreObservations2DCommand();

            command.Observations2DLayout = Observations2DLayoutEnum.datatypesBySubjects;

            command.AddSubject("BHP");
            command.AddPublisher("GAMMA");

            command.AddDataType("EPS");
            command.AddDataType("DPS");

            command.AddObservedPeriod("2018");

            command.Currency = "USD";

            string[,] values =
            {
                { "1.10", ".03" }
            };

            command.SetValues(ref values);

            IStoreObservations2DResponse response = gateway.StoreObservations2D(command);

            Assert.AreEqual(0, response.ErrorsTotal);
        }