BatchFlow.UnitTests.Exceptions.ConnectingWrongTypesThrows C# (CSharp) Method

ConnectingWrongTypesThrows() private method

private ConnectingWrongTypesThrows ( ) : void
return void
        public void ConnectingWrongTypesThrows()
        {
            List<string> results = new List<string>();
            StartPoint<int> s = Helpers.GetStartpointCounter(1, 15);
            EndPoint<string> n = Helpers.GetEndpoint(results);

            Flow flow = new Flow();
            flow.AddNode(s);
            flow.AddNode(n);
            try
            {
                flow.ConnectNodes(s, n, 0);
                Assert.Fail("Connecting nodes of different types should throw invalid operation exception");
            }
            catch (InvalidOperationException)
            { }
        }