コード例 #1
0
        public void StatefulPartition_Creation_ServicePartitionInfoIsCreated()
        {
            var rv = StatefulPartitionTest.ReplicatorCreationHelper();

            var expected = ServicePartitionInformation.FromNative(StatefulPartitionTest.DefaultPartitionInfo);
            var actual   = rv.Item2.PartitionInfo;

            Assert.AreEqual <Guid>(expected.Id, actual.Id);
            Assert.AreEqual(expected.GetType(), actual.GetType());
            Assert.AreEqual <Guid>(expected.Id, (Guid)rv.Item2.PartitionInfo.Id);
        }
コード例 #2
0
        private void ReplicatorSettingsTestHelper(
            ReplicatorSettings valueToPass,
            NativeTypes.FABRIC_REPLICATOR_SETTINGS_FLAGS flagsExpected,
            Action <NativeTypes.FABRIC_REPLICATOR_SETTINGS> validator)
        {
            var rv = StatefulPartitionTest.ReplicatorCreationHelper(valueToPass);

            NativeTypes.FABRIC_REPLICATOR_SETTINGS nativeObj = rv.Item1.ReplicatorSettings.Value;

            Assert.AreEqual <uint>((uint)flagsExpected, rv.Item1.ReplicatorSettings.Value.Flags);
            validator(nativeObj);
        }
コード例 #3
0
        public void StatefulPartition_Creation_ReplicatorSettings_NullResultsInNoObject()
        {
            var rv = StatefulPartitionTest.ReplicatorCreationHelper(null);

            Assert.IsFalse(rv.Item1.ReplicatorSettings.HasValue);
        }