Ejemplo n.º 1
0
        public void AreSimilarContractWithSimilarTypes()
        {
            var first  = new OfflineTypeInformation(typeof(int).FullName, typeof(int).Assembly.GetName());
            var second = new OfflineTypeInformation(typeof(int).FullName, new AssemblyName(typeof(int).Assembly.GetName().Name));

            Assert.IsTrue(first.AreSimilarContract(second));
        }
Ejemplo n.º 2
0
        public void AreSimilarContractWithSimilarTypesInDifferentAssemblies()
        {
            var first  = new OfflineTypeInformation(typeof(int).FullName, typeof(int).Assembly.GetName());
            var second = new OfflineTypeInformation(typeof(int).FullName, new AssemblyName(typeof(TestAttribute).Assembly.GetName().Name));

            Assert.IsFalse(first.AreSimilarContract(second));
        }
Ejemplo n.º 3
0
        public void AreSimilarContractWithNullReference()
        {
            var type = typeof(int);
            var data = new OfflineTypeInformation(type.FullName, type.Assembly.GetName());

            Assert.IsFalse(data.AreSimilarContract(null));
        }