コード例 #1
0
 /// <param name="path">Configuration path.</param>
 /// <param name="buildingStrategy">Determines the strategy for usage of path should it be appended to class name as prefix or should it replace the class name.</param>
 public ConfigurationRootAttribute(string path, RootStrategy buildingStrategy)
 {
     if (string.IsNullOrEmpty(path))
     {
         throw new ArgumentOutOfRangeException(nameof(path));
     }
     BuildingStrategy = buildingStrategy;
     Path             = path;
 }
コード例 #2
0
        public void Test()
        {
            Strategy strategy = new PowerStrategy();

            Assert.That(strategy.Solve(27, 3), Is.EqualTo(19683));

            strategy = new RootStrategy();
            Assert.That(strategy.Solve(27, 3), Is.EqualTo(3));
        }