Beispiel #1
0
        public void TestGetNodeValueIsNull()
        {
            var dispatchAble = new DispatchableMock(Guid.NewGuid());
            var nodeValue    = Controller.GetNodeValue(dispatchAble.Id);

            Assert.Null(nodeValue);
        }
Beispiel #2
0
        public void TestGetNodeValues()
        {
            var dispatchAble = new DispatchableMock(Guid.NewGuid());
            var dispatcher   = ServiceProvider.GetRequiredService <IDispatcher>();

            dispatcher.DispatchValue(dispatchAble, true);

            var nodeValue = Controller.GetNodeValue(dispatchAble.Id);

            Assert.NotNull(nodeValue);
            Assert.Equal(true, nodeValue);
        }
Beispiel #3
0
        public void TestGetCurrentValues()
        {
            var dispatchAble = new DispatchableMock();
            var dispatcher   = ServiceProvider.GetRequiredService <IDispatcher>();

            dispatcher.DispatchValue(dispatchAble, false);

            var currentNodeValues = Controller.GetCurrentNodeValues();

            Assert.Contains(dispatchAble.Id, currentNodeValues);
            Assert.Equal(false, currentNodeValues[dispatchAble.Id]);
        }