예제 #1
0
        public void Should_return_Total_Credits(string galaxyUnit, string expectedResult)
        {
            //Arrange
            var GalaxyContext = new GalaxyContext(galaxyUnit);
            var tree          = new List <Expression>();

            tree.Add(new Thousand());
            tree.Add(new Hundred());
            tree.Add(new Ten());
            tree.Add(new One());
            tree.Add(new SilverMaterial());
            tree.Add(new GoldMaterial());
            tree.Add(new IronMaterial());
            //Act
            foreach (var item in tree)
            {
                item.Interpret(GalaxyContext);
            }
            if (!GalaxyContext.IsKnown)
            {
                GalaxyContext.SetUnknown();
            }
            //Assert
            Assert.Equal(expectedResult, GalaxyContext.Output);
        }
예제 #2
0
        public void Given_A_GalacticUnit_String_Should_Return_A_RomanNumeral(string galaxyString, string expectedResult)
        {
            //Arrange
            var GalaxyContext = new GalaxyContext(galaxyString);
            var tree          = new List <Expression>();

            tree.Add(new Thousand());
            tree.Add(new Hundred());
            tree.Add(new Ten());
            tree.Add(new One());
            tree.Add(new SilverMaterial());
            //Act
            foreach (var item in tree)
            {
                item.Interpret(GalaxyContext);
            }
            //Assert
            Assert.Equal(expectedResult, GalaxyContext.MessageRoman);
        }
예제 #3
0
 public ArticuloServices(GalaxyContext galaxyContext)
 {
     this.galaxyContext = galaxyContext;
 }
 public PostsController(GalaxyContext context)
 {
     _context = context;
 }
예제 #5
0
 public OpcionServices(GalaxyContext galaxyContext)
 {
     this.galaxyContext = galaxyContext;
 }
예제 #6
0
 public TipoArticuloServices(GalaxyContext galaxyContext, ILogger <TipoArticuloServices> logger)
 {
     this.galaxyContext = galaxyContext;
     this.logger        = logger;
 }
예제 #7
0
 public AccountController()
 {
     _context    = new GalaxyContext();
     _appContext = new ApplicationDbContext();
 }
예제 #8
0
 public UserAppServices(GalaxyContext galaxyContext, ILogger <UserAppServices> logger)
 {
     this.galaxyContext = galaxyContext;
     this.logger        = logger;
 }