Exemple #1
0
        public void ReadFileAndSetInputFileParam()
        {
            _dlImporter = new DLImporter();
            _dlImporter.SetParam(NetworkReaderParameterNames._INPUT_FILE, Path.Combine(Properties.Resources.DL_TestDataPath, _testFile1));
            _dlImporter.Read();
            INetwork network = _dlImporter.Network;

            Assert.NotNull(network);
        }
Exemple #2
0
        public void ReadFile_And_Verify_Random_Id_Assigned()
        {
            Guid id = Guid.NewGuid();
            _dlImporter = new DLImporter();
            _dlImporter.SetParam(NetworkReaderParameterNames._INPUT_FILE, Path.Combine(Properties.Resources.DL_TestDataPath, _testFile1));
            _dlImporter.Read();
            INetwork network = _dlImporter.Network;

            Assert.NotEqual(Guid.Empty, network.Id);
        }
Exemple #3
0
        public void ReadFileAndSetNetworkName()
        {
            const string name = "LuLa";
            _dlImporter = new DLImporter();
            _dlImporter.SetParam(NetworkReaderParameterNames._INPUT_FILE, Path.Combine(Properties.Resources.DL_TestDataPath, _testFile1));
            _dlImporter.SetParam(NetworkReaderParameterNames._NETWORK_NAME, name);
            _dlImporter.Read();
            INetwork network = _dlImporter.Network;

            string actualName = network.Name;
            Assert.Equal(name, actualName);
        }
Exemple #4
0
        public void ReadFileAndSetNetworkId()
        {
            Guid id = Guid.NewGuid();
            _dlImporter = new DLImporter();
            _dlImporter.SetParam(NetworkReaderParameterNames._INPUT_FILE, Path.Combine(Properties.Resources.DL_TestDataPath, _testFile1));
            _dlImporter.SetParam(NetworkReaderParameterNames._NETWORK_ID, id.ToString());
            _dlImporter.Read();
            INetwork network = _dlImporter.Network;

            Guid actualId = network.Id;
            Assert.Equal(id, actualId);
        }