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); }
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); }
public void StatefulPartition_Creation_ReplicatorSettings_NullResultsInNoObject() { var rv = StatefulPartitionTest.ReplicatorCreationHelper(null); Assert.IsFalse(rv.Item1.ReplicatorSettings.HasValue); }