Пример #1
0
        public void EqualsWithUnequalObjectTypes()
        {
            var first  = new GroupExportMap("a");
            var second = new object();

            Assert.IsFalse(first.Equals(second));
        }
Пример #2
0
        public void RoundtripSerialize()
        {
            var original = new GroupExportMap("a");
            var copy     = AssertExtensions.RoundTripSerialize(original);

            Assert.AreEqual(original, copy);
        }
Пример #3
0
        public void EqualsWithEqualObjects()
        {
            var    first  = new GroupExportMap("a");
            object second = new GroupExportMap("a");

            Assert.IsTrue(first.Equals(second));
        }
Пример #4
0
        public void EqualsWithNullObject()
        {
            var    first  = new GroupExportMap("a");
            object second = null;

            Assert.IsFalse(first.Equals(second));
        }
Пример #5
0
        /// <summary>
        /// Clears the registrations stored for the group that is under construction.
        /// </summary>
        public void Clear()
        {
            m_Objects     = new Dictionary <Type, List <GroupPartDefinition> >();
            m_Connections = new Dictionary <ImportRegistrationId, List <ExportRegistrationId> >();

            m_Actions    = new Dictionary <ScheduleActionRegistrationId, ScheduleElementId>();
            m_Conditions = new Dictionary <ScheduleConditionRegistrationId, ScheduleElementId>();
            m_Schedule   = null;

            m_GroupExport  = null;
            m_GroupImports = new Dictionary <string, GroupImportMap>();
        }
Пример #6
0
        public void Create()
        {
            var obj = new GroupExportMap("a");

            Assert.AreEqual("a", obj.ContractName);
        }
Пример #7
0
 /// <summary>
 /// Defines an export for the group. The export is created with the specified name
 /// and all the open exports and the group schedule.
 /// </summary>
 /// <param name="contractName">The contract name for the group export.</param>
 /// <remarks>Only one export can be defined per group.</remarks>
 /// <exception cref="ArgumentNullException">
 ///     Thrown if <paramref name="contractName"/> is <see langword="null" />.
 /// </exception>
 /// <exception cref="ArgumentException">
 ///     Thrown if <paramref name="contractName"/> is an empty string.
 /// </exception>
 public void DefineExport(string contractName)
 {
     m_GroupExport = new GroupExportMap(contractName);
 }