Esempio n. 1
0
        public string BitbarSource()
        {
            JsonRequestHandler req = new JsonRequestHandler(
                this, APIRoutes.BitbarSource);

            return(req.Handle().ToString());
        }
        public void Handle_Action()
        {
            //Arrange

            string requestTypeAssemblyQualifiedName = typeof(IncrementCounterAction).AssemblyQualifiedName;
            var    incrementCounterAction           = new IncrementCounterAction
            {
                Amount = 5
            };

            string requestAsJson  = JsonSerializer.Serialize(incrementCounterAction, JsonSerializerOptions);
            int    preActionCount = CounterState.Count;

            //Act
            JsonRequestHandler.Handle(requestTypeAssemblyQualifiedName, requestAsJson);

            //Assert
            CounterState.Count.ShouldBe(preActionCount + 5);
        }