public void AddFootballStadium_should_return_NameOfStadium() { //arrange FootballStadium footballStadium = new FootballStadium(); var football = new FootballStadiumService(new XMLProvider <FootballStadium>("footballl.xml")); string name = "Football"; var expected = footballStadium.Name = "Football"; //act football.AddFoortballStadium(name); //assert Assert.Equal(expected, footballStadium.Name); }
public void AddPriceofTicket_should_AddPriceOfTicket() { //arrange FootballStadium footballStadia = new FootballStadium(); var football = new FootballStadiumService(new XMLProvider <FootballStadium>("footballl.xml")); double price = 10; var expected = footballStadia.PriceOfTicket = 10; //act football.AddPriceofTicket(price); //assert Assert.Equal(expected, footballStadia.PriceOfTicket); }
public void AddCountOfPlace_should_AddCountOfPlace_2() { //arrange FootballStadium footballStadia = new FootballStadium(); var football = new FootballStadiumService(new XMLProvider <FootballStadium>("footballl.xml")); int place = 2; var expected = footballStadia.NumberofPlace = 2; //act football.AddCountOfPlace(place); //assert Assert.Equal(expected, footballStadia.NumberofPlace); }
public void AddDayofGame_should_AddDayofTheGame() { //arrange FootballStadium footballStadia = new FootballStadium(); var football = new FootballStadiumService(new XMLProvider <FootballStadium>("footballl.xml")); int day = 10; var expected = footballStadia.DayoOfGame = 10; //act football.AddDayofGame(day); //assert Assert.Equal(expected, footballStadia.DayoOfGame); }
public void AddPriceofTicket_should_AddPriceOfTicket() { //arrange FootballStadium footballStadia = new FootballStadium(); var service = new ServiceCollection() .AddSingleton <FootballStadiumService>() .AddSingleton <ISave>(x => x.GetRequiredService <FootballStadiumService>()) .AddSingleton <IFootball>(x => x.GetRequiredService <FootballStadiumService>()) .BuildServiceProvider(); var football = service.GetService <FootballStadiumService>(); double price = 10; var expected = footballStadia.PriceOfTicket = 10; //act football.AddPriceofTicket(price); //assert Assert.AreEqual(expected, footballStadia.PriceOfTicket); }
public void AddCountOfPlace_should_AddCountOfPlace_2() { //arrange FootballStadium footballStadia = new FootballStadium(); var service = new ServiceCollection() .AddSingleton <FootballStadiumService>() .AddSingleton <ISave>(x => x.GetRequiredService <FootballStadiumService>()) .AddSingleton <IFootball>(x => x.GetRequiredService <FootballStadiumService>()) .BuildServiceProvider(); var football = service.GetService <FootballStadiumService>(); int place = 2; var expected = footballStadia.NumberofPlace = 2; //act football.AddCountOfPlace(place); //assert Assert.AreEqual(expected, footballStadia.NumberofPlace); }
public void AddDayofGame_should_AddDayofTheGame() { //arrange FootballStadium footballStadia = new FootballStadium(); var service = new ServiceCollection() .AddSingleton <FootballStadiumService>() .AddSingleton <ISave>(x => x.GetRequiredService <FootballStadiumService>()) .AddSingleton <IFootball>(x => x.GetRequiredService <FootballStadiumService>()) .BuildServiceProvider(); var football = service.GetService <FootballStadiumService>(); int day = 10; var expected = footballStadia.DayoOfGame = 10; //act football.AddDayofGame(day); //assert Assert.AreEqual(expected, footballStadia.DayoOfGame); }
public void AddFootballStadium_should_return_NameOfStadium() { //arrange FootballStadium footballStadium = new FootballStadium(); var service = new ServiceCollection() .AddSingleton <FootballStadiumService>() .AddSingleton <ISave>(x => x.GetRequiredService <FootballStadiumService>()) .AddSingleton <IFootball>(x => x.GetRequiredService <FootballStadiumService>()) .BuildServiceProvider(); var football = service.GetService <FootballStadiumService>(); string name = "Football"; var expected = footballStadium.Name = "Football"; //act football.Add(name); //assert Assert.AreEqual(expected, footballStadium.Name); }