Пример #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));
        }
Пример #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));
        }
Пример #3
0
        public void AreSimilarContractWithNullReference()
        {
            var type = typeof(int);
            var data = new OfflineTypeInformation(type.FullName, type.Assembly.GetName());

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