コード例 #1
0
        public void TwoDeserialisedTaskInstanceHaveSameHashCodes()
        {
            const string assemblyLocation = "C:\\assembly.dll";

            var task1 = new XunitTestAssemblyTask(assemblyLocation);

            var xmlDocument = new XmlDocument();
            var xmlElement = xmlDocument.CreateElement("root");
            xmlDocument.AppendChild(xmlElement);
            task1.SaveXml(xmlDocument.DocumentElement);

            var task2 = new XunitTestAssemblyTask(xmlDocument.DocumentElement);

            Assert.NotSame(task1, task2);
            Assert.Equal(task1.GetHashCode(), task2.GetHashCode());
        }
コード例 #2
0
        public void CanSerialiseToAndFromXml()
        {
            const string assemblyLocation = "C:\\assembly.dll";

            var task1 = new XunitTestAssemblyTask(assemblyLocation);

            var xmlDocument = new XmlDocument();
            var xmlElement = xmlDocument.CreateElement("root");
            xmlDocument.AppendChild(xmlElement);
            task1.SaveXml(xmlDocument.DocumentElement);

            var task2 = new XunitTestAssemblyTask(xmlDocument.DocumentElement);

            Assert.NotSame(task1, task2);
            Assert.Equal(task1, task2);
        }
コード例 #3
0
        public void TwoDeserialisedTaskInstanceHaveSameHashCodes()
        {
            const string assemblyLocation = "C:\\assembly.dll";

            var task1 = new XunitTestAssemblyTask(assemblyLocation);

            var xmlDocument = new XmlDocument();
            var xmlElement  = xmlDocument.CreateElement("root");

            xmlDocument.AppendChild(xmlElement);
            task1.SaveXml(xmlDocument.DocumentElement);

            var task2 = new XunitTestAssemblyTask(xmlDocument.DocumentElement);

            Assert.NotSame(task1, task2);
            Assert.Equal(task1.GetHashCode(), task2.GetHashCode());
        }
コード例 #4
0
        public void CanSerialiseToAndFromXml()
        {
            const string assemblyLocation = "C:\\assembly.dll";

            var task1 = new XunitTestAssemblyTask(assemblyLocation);

            var xmlDocument = new XmlDocument();
            var xmlElement  = xmlDocument.CreateElement("root");

            xmlDocument.AppendChild(xmlElement);
            task1.SaveXml(xmlDocument.DocumentElement);

            var task2 = new XunitTestAssemblyTask(xmlDocument.DocumentElement);

            Assert.NotSame(task1, task2);
            Assert.Equal(task1, task2);
        }