public void ConfirmServiceInterfacesListContents()
        {
            // GeneratorTestDerivedDerivedGrainReference extends GeneratorTestDerivedGrain2Reference
            // GeneratorTestDerivedGrain2Reference extends GeneratorTestGrainReference
            Type t1 = typeof(IGeneratorTestDerivedDerivedGrain);
            Type t2 = typeof(IGeneratorTestDerivedGrain2);
            Type t3 = typeof(IGeneratorTestGrain);

            var interfaces = GrainInterfaceUtils.GetRemoteInterfaces(typeof(IGeneratorTestDerivedDerivedGrain));

            Assert.NotNull(interfaces);
            Assert.Equal(3, interfaces.Count);
            Assert.Contains(t1, interfaces);
            Assert.Contains(t2, interfaces);
            Assert.Contains(t3, interfaces);
        }
Example #2
0
        public void ConfirmServiceInterfacesListContents()
        {
            // GeneratorTestDerivedDerivedGrainReference extends GeneratorTestDerivedGrain2Reference
            // GeneratorTestDerivedGrain2Reference extends GeneratorTestGrainReference
            Type t1  = typeof(IGeneratorTestDerivedDerivedGrain);
            Type t2  = typeof(IGeneratorTestDerivedGrain2);
            Type t3  = typeof(IGeneratorTestGrain);
            int  id1 = GrainInterfaceUtils.GetGrainInterfaceId(t1);
            int  id2 = GrainInterfaceUtils.GetGrainInterfaceId(t2);
            int  id3 = GrainInterfaceUtils.GetGrainInterfaceId(t3);

            var interfaces = GrainInterfaceUtils.GetRemoteInterfaces(typeof(IGeneratorTestDerivedDerivedGrain));

            Assert.NotNull(interfaces);
            Assert.Equal(3, interfaces.Keys.Count);
            Assert.True(interfaces.Keys.Contains(id1), "id1 is present");
            Assert.True(interfaces.Keys.Contains(id2), "id2 is present");
            Assert.True(interfaces.Keys.Contains(id3), "id3 is present");
        }