예제 #1
0
            private string GivenNewLocationWithAnAlreadyExistingLocationName(string duplicateLocationName)
            {
                var command = new ApiLocationSaveCommand
                {
                    name = duplicateLocationName
                };

                return(JsonSerialiser.Serialise(command));
            }
예제 #2
0
            private string GivenNewUniqueLocation()
            {
                var command = new ApiLocationSaveCommand
                {
                    name = "Mt Eden Squash Club"
                };

                return(JsonSerialiser.Serialise(command));
            }
예제 #3
0
            private string GivenValidLocationSaveCommand()
            {
                var command = new ApiLocationSaveCommand
                {
                    name = "Mt Eden Soccer Club"
                };

                return(JsonSerialiser.Serialise(command));
            }
예제 #4
0
        private static string CreateNewCoachSaveCommand(ExpectedLocation expectedLocation)
        {
            var command = new ApiLocationSaveCommand
            {
                name = expectedLocation.Name
            };

            return(JsonSerialiser.Serialise(command));
        }
예제 #5
0
            private string GivenExistingLocationAndKeepLocationNameSame(SetupData setup)
            {
                var command = new ApiLocationSaveCommand
                {
                    id   = setup.Orakei.Id,
                    name = setup.Orakei.Name
                };

                return(JsonSerialiser.Serialise(command));
            }
예제 #6
0
            private string GivenExistingLocationAndChangeToUniqueLocationName(SetupData setup, string newLocationName)
            {
                var command = new ApiLocationSaveCommand
                {
                    id   = setup.Orakei.Id,
                    name = newLocationName
                };

                return(JsonSerialiser.Serialise(command));
            }
예제 #7
0
            private string GivenExistingLocationAndChangeToAnAlreadyExistingLocationName(SetupData setup)
            {
                var command = new ApiLocationSaveCommand
                {
                    id   = setup.Remuera.Id,
                    name = setup.Orakei.Name
                };

                return(JsonSerialiser.Serialise(command));
            }
예제 #8
0
        private ApiResponse WhenTryPost(ApiLocationSaveCommand command, SetupData setup)
        {
            var json = JsonSerialiser.Serialise(command);

            return(AuthenticatedPost <LocationData>(json, RelativePath, setup));
        }