示例#1
0
        public void GetFlagsDefinitions_can_get_definitions_from_stream(ICreatesBrowserVersions versionFactory)
        {
            // Arrange
            var sut = new DefinitionReader(versionFactory);

            Mock.Get(versionFactory)
            .Setup(x => x.CreateVersion(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>()))
            .Returns((string ver, string browser, string presumed) => new SimpleStringVersion(ver));
            var expected = GetSampleDefinitionsContents();

            // Act
            IReadOnlyCollection <FlagsDefinition> result;

            using (var stream = GetSampleDefinitionsStream())
                result = sut.GetFlagsDefinitions(stream);

            // Assert
            Assert.That(result, Is.EqualTo(expected));
        }
 public void Test_Create_Instance()
 {
     var instance = new DefinitionReader();
 }
示例#3
0
 public void LoadNodeDef(Stream res)
 {
     DefinitionReader.Get().Load(res);
 }
示例#4
0
 public void LoadNodeDef(string resName)
 {
     DefinitionReader.Get().Load(resName);
 }