public void There_and_back_again()
		{
			var formatter = new BinaryMessageFormatter();
			const string parentTestId = "parentTestId";
			var message = new TestDiscoveredMessage { ParentTestId = parentTestId };

			var bytes = formatter.Serialise(message);
			var deserialisedMessage = (TestDiscoveredMessage)formatter.Deserialise(bytes);

			Assert.That(deserialisedMessage.ParentTestId, Is.EqualTo(parentTestId));
		}
Ejemplo n.º 2
0
                private void HandleTestDiscoveredMessage(TestDiscoveredMessage message)
                {
                    GallioTestElement element;
                    if (!tests.TryGetValue(message.Test.Id, out element))
                    {
                        if (ShouldTestBePresented(message.Test.CodeElement))
                        {
                            GallioTestElement parentElement;
                            tests.TryGetValue(message.ParentTestId, out parentElement);

                            element = GallioTestElement.CreateFromTest(message.Test, message.Test.CodeElement, provider, parentElement);
                            consumer(element);
                        }

                        tests.Add(message.Test.Id, element);
                    }
                }
Ejemplo n.º 3
0
            private void HandleTestDiscoveredMessage(TestDiscoveredMessage message)
            {
                reportBox.Write(report =>
                {
                    ThrowIfDisposed();

                    TestData mergedTest = report.TestModel.MergeSubtree(message.ParentTestId, message.Test);

                    eventDispatcher.NotifyTestDiscovered(
                        new TestDiscoveredEventArgs(report, mergedTest));
                });
            }